* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "Segoe UI", "PingFang SC", sans-serif; background: #f0f2f5; color: #333; font-size: 14px; }

/* —— 导航壳（index.html）—— */
.index-shell { display: flex; height: 100vh; }
.index-sidebar { width: 220px; background: #001529; color: #fff; flex-shrink: 0; overflow-y: auto; }
.index-sidebar .logo { padding: 16px 20px; font-size: 16px; font-weight: 600; border-bottom: 1px solid #002140; }
.index-sidebar .mod { padding: 8px 0; }
.index-sidebar .mod-title { padding: 8px 20px; font-size: 11px; color: #ffffff73; text-transform: none; }
.index-sidebar a { display: block; padding: 10px 20px 10px 32px; color: #ffffffa6; text-decoration: none; font-size: 13px; cursor: pointer; border: none; background: none; width: 100%; text-align: left; }
.index-sidebar a:hover, .index-sidebar a.active { background: #1890ff; color: #fff; }
.index-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.index-topbar { height: 48px; background: #fff; border-bottom: 1px solid #e8e8e8; display: flex; align-items: center; padding: 0 24px; justify-content: space-between; flex-shrink: 0; }
.index-topbar button { background: #1890ff; color: #fff; border: none; padding: 6px 16px; border-radius: 4px; cursor: pointer; font-size: 13px; }
.index-frame-wrap { flex: 1; background: #f0f2f5; min-height: 0; }
.index-frame-wrap iframe { width: 100%; height: 100%; border: none; display: block; }

/* —— 单页内容区（iframe 内，无侧栏）—— */
.ad-page { padding: 24px; min-height: 100vh; }

.search-bar { background: #fff; padding: 16px; border-radius: 4px; margin-bottom: 16px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.search-bar input, .search-bar select { padding: 6px 12px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; }
.search-bar button { padding: 6px 16px; background: #1890ff; color: #fff; border: none; border-radius: 4px; cursor: pointer; }
.search-bar button.btn-default { background: #fff; color: #333; border: 1px solid #d9d9d9; }

.table-wrap { background: #fff; border-radius: 4px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 800px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f0f0f0; font-size: 12px; white-space: nowrap; }
th { background: #fafafa; font-weight: 600; position: sticky; top: 0; }
.btn-link { color: #1890ff; cursor: pointer; margin-right: 8px; background: none; border: none; font-size: 13px; }
.btn-link.danger { color: #ff4d4f; }

.form-card { background: #fff; padding: 24px; border-radius: 4px; max-width: 640px; }
.form-row { margin-bottom: 20px; }
.form-row label { display: block; margin-bottom: 6px; font-weight: 500; }
.form-row input { width: 100%; max-width: 320px; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 4px; }
.form-actions { margin-top: 24px; display: flex; gap: 12px; }
.form-actions button { padding: 8px 20px; border-radius: 4px; cursor: pointer; font-size: 14px; }
.form-actions .primary { background: #1890ff; color: #fff; border: none; }
.form-actions .default { background: #fff; border: 1px solid #d9d9d9; }

.form-section-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.form-section-desc { font-size: 12px; color: #999; margin-bottom: 16px; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.tag-pending { background: #fff7e6; color: #d46b08; }
.tag-ok { background: #f6ffed; color: #389e0d; }
.tag-reject { background: #fff1f0; color: #cf1322; }
.tag-platform { background: #fff8e6; color: #8b6914; }
.tag-grass { background: #f0faf0; color: #07a050; }
.tag-muted { background: #f5f5f5; color: #999; }

.breadcrumb { font-size: 13px; color: #999; margin-bottom: 16px; }

.pagination { background: #fff; padding: 12px 16px; border-radius: 0 0 4px 4px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; font-size: 13px; color: #666; border-top: 1px solid #f0f0f0; }
.pagination button { padding: 4px 10px; border: 1px solid #d9d9d9; background: #fff; border-radius: 4px; cursor: pointer; }

/* 规格抽屉（仅 index 壳层） */
.drawer-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; display: none; }
.drawer-overlay.open { display: block; }
.drawer { position: fixed; top: 0; right: -440px; width: 420px; height: 100%; background: #fff; z-index: 101; transition: right .25s; overflow-y: auto; box-shadow: -2px 0 8px rgba(0,0,0,.15); }
.drawer.open { right: 0; }
.drawer-head { padding: 16px 24px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: #fff; z-index: 1; }
.drawer-section { padding: 16px 24px; border-bottom: 1px solid #f0f0f0; }
.drawer-section h4 { font-size: 13px; color: #1890ff; margin-bottom: 8px; }
.drawer-section pre { font-size: 12px; line-height: 1.6; white-space: pre-wrap; font-family: inherit; color: #666; }

/* 页内业务弹窗（D5，iframe 内） */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 50; display: none; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 8px; width: min(720px, 92vw); max-height: 80vh; display: flex; flex-direction: column; box-shadow: 0 4px 24px rgba(0,0,0,.15); }
.modal-head { padding: 16px 20px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 16px 20px; overflow: auto; flex: 1; }
.modal-foot { padding: 12px 20px; border-top: 1px solid #f0f0f0; text-align: right; }
.modal-foot button { padding: 6px 16px; border: 1px solid #d9d9d9; background: #fff; border-radius: 4px; cursor: pointer; }
