* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f0f2f5; color: #333; font-size: 14px; }
a { color: #1890ff; text-decoration: none; }
button { font-family: inherit; }
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #001529; color: #fff; padding: 16px; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar h2 { font-size: 16px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid #1f3a5a; }
.menu { list-style: none; flex: 1; }
.menu li { padding: 10px 14px; margin: 4px 0; border-radius: 4px; cursor: pointer; font-size: 14px; transition: all .2s; }
.menu li:hover { background: #1f3a5a; }
.menu li.active { background: #1890ff; }
.sidebar-footer { border-top: 1px solid #1f3a5a; padding-top: 12px; font-size: 13px; }
.user-info { padding: 8px 14px; line-height: 1.6; }
.logout-btn { width: 100%; background: transparent; border: 1px solid #1f3a5a; color: #ff7875; padding: 8px; border-radius: 4px; cursor: pointer; font-size: 13px; margin-top: 8px; }
.logout-btn:hover { background: #1f3a5a; }
.main { flex: 1; padding: 24px; overflow: auto; }
.header { background: #fff; padding: 16px 24px; border-radius: 4px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,21,41,.08); display: flex; justify-content: space-between; align-items: center; }
.header h1 { font-size: 18px; color: #333; }
.status-badge { display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 12px; background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.card { background: #fff; padding: 20px; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,21,41,.08); }
.card .label { font-size: 12px; color: #999; }
.card .value { font-size: 24px; font-weight: 600; margin-top: 8px; color: #1890ff; }
.panel { background: #fff; padding: 24px; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,21,41,.08); margin-bottom: 16px; }
.panel h3 { font-size: 16px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; }
.btn { background: #1890ff; color: #fff; border: none; padding: 8px 16px; border-radius: 4px; cursor: pointer; font-size: 14px; transition: all .2s; }
.btn:hover { background: #40a9ff; }
.btn:disabled { background: #bae0ff; cursor: not-allowed; }
.btn.default { background: #fff; color: #333; border: 1px solid #d9d9d9; }
.btn.default:hover { color: #1890ff; border-color: #1890ff; background: #fff; }
.btn.danger { background: #ff4d4f; }
.btn.danger:hover { background: #ff7875; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn + .btn { margin-left: 8px; }
.toolbar { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; }
.toolbar .grow { flex: 1; }
.toolbar input, .toolbar select { padding: 6px 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; }
table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: 0 1px 4px rgba(0,21,41,.08); border-radius: 4px; overflow: hidden; }
th, td { padding: 12px; text-align: left; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
th { background: #fafafa; color: #666; font-weight: 500; }
tr:hover td { background: #fafafa; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.tag.green { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.tag.red { background: #fff1f0; color: #ff4d4f; border: 1px solid #ffa39e; }
.tag.blue { background: #e6f7ff; color: #1890ff; border: 1px solid #91d5ff; }
.tag.gray { background: #fafafa; color: #999; border: 1px solid #d9d9d9; }
a.op { color: #1890ff; cursor: pointer; margin-right: 8px; }
a.op.danger { color: #ff4d4f; }
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal { background: #fff; border-radius: 4px; width: 560px; max-width: 95vw; max-height: 90vh; display: flex; flex-direction: column; }
.modal-header { padding: 16px 24px; border-bottom: 1px solid #f0f0f0; font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.modal-header .close { cursor: pointer; color: #999; font-size: 20px; }
.modal-body { padding: 24px; overflow: auto; }
.modal-footer { padding: 12px 24px; border-top: 1px solid #f0f0f0; text-align: right; }
.form-row { display: flex; gap: 16px; margin-bottom: 16px; align-items: flex-start; }
.form-row .grow { flex: 1; }
.form-row label { display: block; font-size: 13px; color: #666; margin-bottom: 4px; }
.form-row label .req { color: #ff4d4f; }
.form-row input, .form-row select, .form-row textarea { width: 100%; padding: 6px 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; font-family: inherit; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: #1890ff; outline: none; }
.form-row textarea { resize: vertical; min-height: 60px; }
.form-row .checkbox { display: inline-flex; align-items: center; gap: 4px; margin-right: 16px; }
.form-row .hint { color: #999; font-size: 12px; margin-top: 4px; }
.steps { display: flex; margin-bottom: 24px; }
.step { flex: 1; text-align: center; padding: 12px; border-bottom: 2px solid #f0f0f0; color: #999; font-size: 13px; }
.step.active { color: #1890ff; border-bottom-color: #1890ff; }
.step.done { color: #52c41a; border-bottom-color: #52c41a; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; padding: 8px; border: 1px solid #f0f0f0; border-radius: 4px; max-height: 360px; overflow: auto; }
.perm-item { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid #f0f0f0; border-radius: 4px; cursor: pointer; font-size: 13px; }
.perm-item:hover { background: #f0f5ff; }
.perm-item.checked { background: #e6f7ff; border-color: #91d5ff; }
.toast { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); padding: 10px 20px; border-radius: 4px; color: #fff; z-index: 2000; opacity: 0; transition: opacity .3s; font-size: 14px; }
.toast.info { background: #1890ff; opacity: 1; }
.toast.success { background: #52c41a; opacity: 1; }
.toast.error { background: #ff4d4f; opacity: 1; }
.login-body { background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-box { background: #fff; padding: 40px; border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,.2); width: 360px; }
.login-box h1 { font-size: 20px; color: #333; margin-bottom: 8px; text-align: center; }
.login-box .subtitle { font-size: 13px; color: #999; text-align: center; margin-bottom: 28px; }
.login-box .form-group { margin-bottom: 16px; }
.login-box label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.login-box input { width: 100%; padding: 10px 12px; font-size: 14px; border: 1px solid #d9d9d9; border-radius: 4px; outline: none; }
.login-box input:focus { border-color: #1890ff; }
.login-box .btn { width: 100%; padding: 12px; }
.login-box .msg { margin-top: 12px; padding: 8px 12px; border-radius: 4px; font-size: 13px; display: none; }
.login-box .msg.error { background: #fff1f0; color: #cf1322; border: 1px solid #ffa39e; display: block; }
.login-box .msg.success { background: #f6ffed; color: #389e0d; border: 1px solid #b7eb8f; display: block; }
.login-box .hint { margin-top: 16px; font-size: 12px; color: #999; text-align: center; }


/* 树形菜单 */
.menu-group { list-style: none; margin: 0; padding: 0; }
.menu-group-header { padding: 10px 14px; margin: 2px 0; border-radius: 4px; cursor: pointer; font-size: 14px; display: flex; align-items: center; gap: 6px; transition: background .2s; }
.menu-group-header:hover { background: #1f3a5a; }
.menu-group.expanded > .menu-group-header { background: #1f3a5a; color: #fff; }
.menu-group-header .caret { font-size: 10px; color: #999; transition: transform .2s; display: inline-block; width: 12px; text-align: center; }
.menu-group.expanded > .menu-group-header .caret { transform: rotate(90deg); color: #1890ff; }
.menu-group-header .menu-icon, .menu-group-children .menu-icon { font-size: 14px; }
.menu-group-children { list-style: none; padding: 0; margin: 0 0 4px 0; max-height: 0; overflow: hidden; transition: max-height .3s ease; }
.menu-group.expanded > .menu-group-children { max-height: 500px; }
.menu-group-children li { padding: 8px 14px 8px 32px; margin: 0; border-radius: 0; cursor: pointer; font-size: 13px; color: rgba(255,255,255,.7); border-left: 2px solid transparent; transition: all .2s; }
.menu-group-children li:hover { background: #1f3a5a; color: #fff; }
.menu-group-children li.active { background: #1890ff; color: #fff; border-left-color: #fff; }
.menu-group-children .menu-icon { margin-right: 4px; }

/* 占位页 */
.placeholder-body { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 60vh; text-align: center; }
.placeholder-icon { font-size: 64px; margin-bottom: 16px; opacity: .4; }
.placeholder-title { font-size: 20px; color: #666; margin-bottom: 8px; }
.placeholder-desc { color: #999; font-size: 14px; margin-bottom: 24px; }
.placeholder-back { padding: 8px 24px; }
