/* 图文广告管理系统 - 样式表 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f0f2f5; color: #333; font-size: 14px; }
a { text-decoration: none; color: inherit; }

/* 登录页 */
.login-page { display: flex; height: 100vh; }
.login-left { width: 40%; background: linear-gradient(135deg, #4A90D9, #357ABD); display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; }
.login-left .logo-text { font-size: 72px; font-weight: bold; margin-bottom: 10px; }
.login-left .logo-sub { font-size: 24px; margin-bottom: 5px; }
.login-left .logo-version { font-size: 14px; opacity: 0.8; margin-bottom: 30px; }
.login-left .logo-footer { font-size: 13px; opacity: 0.7; position: absolute; bottom: 30px; }
.login-right { width: 60%; display: flex; align-items: center; justify-content: center; background: #fff; }
.login-form { width: 380px; }
.login-form h2 { font-size: 22px; margin-bottom: 30px; color: #333; }
.login-form .form-group { margin-bottom: 18px; }
.login-form .form-group select, .login-form .form-group input { width: 100%; padding: 12px 15px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; outline: none; transition: border 0.3s; }
.login-form .form-group select:focus, .login-form .form-group input:focus { border-color: #4A90D9; }
.login-form .form-options { display: flex; justify-content: space-between; margin-bottom: 20px; font-size: 13px; color: #666; }
.login-form .form-options label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.login-form .btn-login { width: 100%; padding: 14px; background: #4A90D9; color: #fff; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; transition: background 0.3s; }
.login-form .btn-login:hover { background: #357ABD; }
.login-form .login-tip { margin-top: 15px; font-size: 13px; color: #999; text-align: center; }
.login-error { color: #e74c3c; font-size: 13px; margin-bottom: 10px; }

/* 应用布局 */
.app-container { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar { width: 200px; background: #4A90D9; color: #fff; display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; }
.sidebar-logo { padding: 25px 20px 15px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.15); }
.sidebar-logo .logo-text { font-size: 42px; font-weight: bold; }
.sidebar-logo .logo-sub { font-size: 16px; margin-top: 5px; }
.sidebar-logo .logo-url { font-size: 12px; opacity: 0.7; margin-top: 3px; }
.sidebar-nav { flex: 1; padding: 10px 0; }
.nav-item { display: flex; align-items: center; padding: 14px 25px; color: rgba(255,255,255,0.85); font-size: 15px; transition: all 0.3s; cursor: pointer; }
.nav-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.2); color: #fff; font-weight: bold; }
.nav-icon { margin-right: 10px; font-size: 18px; }

/* 主内容区 */
.main-content { margin-left: 200px; flex: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* 顶部栏 */
.topbar { background: #fff; padding: 12px 25px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e8e8e8; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.topbar-title { font-size: 18px; font-weight: bold; color: #333; }
.topbar-actions { display: flex; align-items: center; gap: 15px; }
.user-info { font-size: 16px; color: #4A90D9; }
.btn-logout { padding: 6px 15px; background: #e74c3c; color: #fff; border-radius: 4px; font-size: 13px; transition: background 0.3s; }
.btn-logout:hover { background: #c0392b; }

/* 页面内容 */
.page-content { flex: 1; padding: 20px 25px; }

/* 底部栏 */
.bottombar { background: #fff; padding: 10px 25px; display: flex; justify-content: space-between; font-size: 13px; color: #999; border-top: 1px solid #e8e8e8; }

/* 仪表盘卡片 */
.dashboard-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-bottom: 20px; }
.dash-card { background: #fff; border-radius: 8px; padding: 20px; display: flex; align-items: center; gap: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.dash-card-icon { width: 50px; height: 50px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; }
.dash-card-icon.blue { background: #4A90D9; }
.dash-card-icon.green { background: #27ae60; }
.dash-card-icon.red { background: #e74c3c; }
.dash-card-info h3 { font-size: 13px; color: #999; font-weight: normal; }
.dash-card-info .count { font-size: 28px; font-weight: bold; margin-top: 3px; }
.dash-card-info .count.blue { color: #4A90D9; }
.dash-card-info .count.green { color: #27ae60; }
.dash-card-info .count.red { color: #e74c3c; }

/* 常用功能区 */
.common-functions { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.common-functions h3 { font-size: 15px; color: #666; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0; }
.func-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; }
.func-item { text-align: center; padding: 15px 5px; cursor: pointer; border-radius: 6px; transition: background 0.3s; }
.func-item:hover { background: #f5f7fa; }
.func-item .func-icon { font-size: 36px; margin-bottom: 8px; display: block; }
.func-item .func-label { font-size: 13px; color: #4A90D9; }

/* 仪表盘布局 */
.dashboard-layout { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.dashboard-main { min-width: 0; }
.dashboard-side { display: flex; flex-direction: column; gap: 15px; }

/* 面板 */
.panel { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); margin-bottom: 20px; }
.panel h3 { font-size: 15px; color: #666; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0; }

/* 通知列表 */
.notification-list { list-style: none; }
.notification-list li { padding: 8px 0; border-bottom: 1px solid #f5f5f5; font-size: 13px; }
.notification-list li:last-child { border-bottom: none; }
.notification-list .notif-type { color: #4A90D9; font-weight: bold; }

/* 模块导航页 */
.module-nav { display: flex; gap: 0; padding: 20px; }
.module-item { text-align: center; padding: 20px 15px; cursor: pointer; border-radius: 8px; transition: all 0.3s; background: #f5f7fa; flex: 1; }
.module-item:hover { background: #e3f2fd; transform: translateY(-3px); box-shadow: 0 6px 16px rgba(74,144,217,0.3); }
.module-item.active { background: #4A90D9; color: #fff; }
.module-item.active .module-label { color: #fff; }
.module-item .module-icon { font-size: 48px; margin-bottom: 12px; display: block; }
.module-item .module-label { font-size: 15px; color: #4A90D9; font-weight: bold; white-space: nowrap; }

/* 表格 */
.data-table { width: 100%; border-collapse: collapse; background: #fff; }
.data-table th, .data-table td { padding: 10px 12px; text-align: center; border: 1px solid #e8e8e8; font-size: 13px; }
.data-table th { background: #f5f7fa; font-weight: bold; color: #555; white-space: nowrap; }
.data-table tr:hover { background: #f9fafb; }
.data-table .status-badge { padding: 3px 10px; border-radius: 3px; font-size: 12px; font-weight: bold; }
.status-badge.success { background: #e8f5e9; color: #27ae60; }
.status-badge.warning { background: #fff3e0; color: #f39c12; }
.status-badge.danger { background: #fce4ec; color: #e74c3c; }
.status-badge.info { background: #e3f2fd; color: #2196f3; }
.status-badge.secondary { background: #f5f5f5; color: #999; }
.settlement-badge { font-weight: bold; }
.settlement-badge.success { color: #27ae60; }
.settlement-badge.warning { color: #f39c12; }
.settlement-badge.info { color: #2196f3; }

/* 工具栏 */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 15px; align-items: center; }
.toolbar .filter-group { display: flex; align-items: center; gap: 8px; margin-right: 15px; }
.toolbar label { font-size: 13px; color: #666; white-space: nowrap; }
.toolbar select, .toolbar input[type="text"], .toolbar input[type="date"] { padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; outline: none; }
.toolbar select:focus, .toolbar input:focus { border-color: #4A90D9; }

/* 按钮 */
.btn { padding: 7px 16px; border: none; border-radius: 4px; font-size: 13px; cursor: pointer; transition: all 0.3s; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.btn-primary { background: #4A90D9; color: #fff; }
.btn-primary:hover { background: #357ABD; }
.btn-success { background: #27ae60; color: #fff; }
.btn-success:hover { background: #219a52; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-warning { background: #f39c12; color: #fff; }
.btn-warning:hover { background: #e67e22; }
.btn-info { background: #2196f3; color: #fff; }
.btn-info:hover { background: #1976d2; }
.btn-secondary { background: #95a5a6; color: #fff; }
.btn-secondary:hover { background: #7f8c8d; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 10px 24px; font-size: 15px; }

/* 分页 */
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 5px; margin-top: 15px; }
.pagination .page-btn { padding: 6px 14px; background: #4A90D9; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 13px; }
.pagination .page-btn:hover { background: #357ABD; }
.pagination .page-info { font-size: 13px; color: #666; margin: 0 10px; }

/* 表单 */
.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 15px; }
.form-row.cols-2 { grid-template-columns: repeat(2, 1fr); }
.form-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
.form-group { display: flex; align-items: center; gap: 8px; }
.form-group label { font-size: 13px; color: #666; white-space: nowrap; min-width: 70px; text-align: right; }
.form-group input, .form-group select, .form-group textarea { flex: 1; padding: 8px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; outline: none; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #4A90D9; }
.form-group textarea { resize: vertical; min-height: 60px; }

/* 模态框 */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 1000; align-items: center; justify-content: center; }
.modal-overlay.active { display: flex; }
.modal { background: #fff; border-radius: 8px; width: 90%; max-width: 900px; max-height: 90vh; overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.modal-header { padding: 15px 20px; background: #4A90D9; color: #fff; display: flex; justify-content: space-between; align-items: center; border-radius: 8px 8px 0 0; }
.modal-header h3 { font-size: 16px; }
.modal-close { background: none; border: none; color: #fff; font-size: 22px; cursor: pointer; }
.modal-body { padding: 20px; }
.modal-footer { padding: 15px 20px; border-top: 1px solid #e8e8e8; display: flex; justify-content: flex-end; gap: 10px; }

/* 统计图表容器 */
.chart-container { position: relative; height: 350px; }

/* 开单页表格 */
.order-table { width: 100%; border-collapse: collapse; margin: 15px 0; }
.order-table th, .order-table td { padding: 8px 6px; text-align: center; border: 1px solid #ddd; font-size: 13px; }
.order-table th { background: #f5f7fa; }
.order-table input, .order-table select { width: 100%; padding: 4px 6px; border: 1px solid #ddd; border-radius: 3px; font-size: 12px; }

/* 快捷按钮 */
.quick-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.quick-btn { padding: 5px 12px; background: #f0f2f5; border: 1px solid #ddd; border-radius: 4px; font-size: 12px; cursor: pointer; transition: all 0.3s; }
.quick-btn:hover { background: #4A90D9; color: #fff; border-color: #4A90D9; }

/* 结算行 */
.settlement-row { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; padding: 15px 0; border-top: 1px solid #e8e8e8; margin-top: 10px; }
.settlement-row .form-group { min-width: 200px; }
.settlement-row .amount-display { font-size: 18px; font-weight: bold; color: #e74c3c; }

/* 树形列表 */
.tree-list { width: 200px; border-right: 1px solid #e8e8e8; padding: 10px; overflow-y: auto; max-height: 600px; }
.tree-item { padding: 6px 10px; cursor: pointer; border-radius: 4px; font-size: 13px; display: flex; align-items: center; gap: 5px; }
.tree-item:hover { background: #f0f2f5; }
.tree-item.active { background: #e3f2fd; color: #4A90D9; font-weight: bold; }
.tree-item .tree-icon { font-size: 14px; }
.tree-children { padding-left: 20px; }

/* 两栏布局 */
.two-col-layout { display: grid; grid-template-columns: 200px 1fr; gap: 0; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

/* 提示文字 */
.tip-text { font-size: 12px; color: #999; margin-top: 5px; }
.tip-text.warning { color: #e74c3c; }

/* 响应式 */
@media (max-width: 1200px) {
    .func-grid { grid-template-columns: repeat(4, 1fr); }
    .dashboard-cards { grid-template-columns: repeat(2, 1fr); }
    .module-nav { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .sidebar { width: 60px; }
    .sidebar-logo .logo-sub, .sidebar-logo .logo-url, .nav-item span:not(.nav-icon) { display: none; }
    .main-content { margin-left: 60px; }
    .func-grid { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
}
