* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 14px; color: #333; background: #f5f6fa; line-height: 1.6; }
a { color: #1890ff; text-decoration: none; }
a:hover { color: #40a9ff; }
.text-center { text-align: center; }
.text-danger { color: #ff4d4f !important; }
.text-muted { color: #999; }
.text-success { color: #52c41a; }

.wrapper { display: flex; min-height: 100vh; }

.sidebar { width: 220px; background: #001529; color: #fff; position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; z-index: 100; }
.sidebar-header { padding: 20px; border-bottom: 1px solid #002140; }
.sidebar-header h3 { font-size: 16px; font-weight: 600; text-align: center; }
.sidebar .nav { list-style: none; padding: 0; margin: 0; }
.sidebar .nav li { border-bottom: 1px solid #002140; }
.sidebar .nav a { display: block; padding: 12px 20px; color: rgba(255,255,255,.65); transition: all .3s; }
.sidebar .nav a:hover { color: #fff; background: #1890ff; }
.sidebar .nav a.text-danger { color: #ff7875; }
.sidebar .nav a.text-danger:hover { background: #a8071a; }
.nav-divider { height: 1px; background: #002140; margin: 8px 0; }

.main { margin-left: 220px; flex: 1; }
.main-full { margin-left: 0; }
.topbar { background: #fff; padding: 12px 24px; border-bottom: 1px solid #e8e8e8; text-align: right; }
.content { padding: 24px; }

.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid #e8e8e8; }
.page-header h2 { font-size: 20px; font-weight: 600; }

.search-box { margin-bottom: 16px; padding: 16px; background: #fff; border-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.search-box form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.search-box label { font-weight: 500; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 20px; }
.form-group { display: flex; flex-direction: column; }
.form-group label { font-weight: 500; margin-bottom: 4px; font-size: 13px; }
.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea { padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; transition: border-color .3s; outline: none; width: 100%; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: #40a9ff; box-shadow: 0 0 0 2px rgba(24,144,255,.2); }
.form-group textarea { resize: vertical; min-height: 60px; }
.form-actions { margin-top: 20px; padding-top: 16px; border-top: 1px solid #e8e8e8; }
.form-actions .btn { margin-right: 8px; }

.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row input { flex: 1; }

.btn { display: inline-block; padding: 8px 16px; border: 1px solid #d9d9d9; border-radius: 4px; background: #fff; cursor: pointer; font-size: 14px; transition: all .3s; text-align: center; }
.btn:hover { border-color: #40a9ff; color: #40a9ff; }
.btn-primary { background: #1890ff; border-color: #1890ff; color: #fff; }
.btn-primary:hover { background: #40a9ff; border-color: #40a9ff; color: #fff; }
.btn-danger { background: #ff4d4f; border-color: #ff4d4f; color: #fff; }
.btn-danger:hover { background: #ff7875; border-color: #ff7875; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { display: block; width: 100%; }

.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 4px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid #f0f0f0; }
.table th { background: #fafafa; font-weight: 600; font-size: 13px; color: #666; }
.table tr:hover { background: #e6f7ff; }
.table .action-cell { white-space: nowrap; }
.table .action-cell form { display: inline; }

.table-detail { width: 100%; border-collapse: collapse; }
.table-detail th, .table-detail td { padding: 10px 14px; border-bottom: 1px solid #f0f0f0; text-align: left; }
.table-detail th { width: 120px; font-weight: 600; color: #666; background: #fafafa; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 500; }
.badge-success { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.badge-danger { background: #fff2f0; color: #ff4d4f; border: 1px solid #ffccc7; }
.badge-warning { background: #fffbe6; color: #faad14; border: 1px solid #ffe58f; }

.alert { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; border: 1px solid transparent; }
.alert-success { background: #f6ffed; border-color: #b7eb8f; color: #52c41a; }
.alert-danger { background: #fff2f0; border-color: #ffccc7; color: #ff4d4f; }

.pagination { display: flex; list-style: none; padding: 16px 0; gap: 4px; justify-content: center; }
.pagination li a { display: block; padding: 6px 12px; border: 1px solid #d9d9d9; border-radius: 4px; color: #333; }
.pagination li a:hover { border-color: #40a9ff; color: #40a9ff; }
.pagination li.active a { background: #1890ff; border-color: #1890ff; color: #fff; }

.login-container { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: #f0f2f5; }
.login-box { width: 380px; padding: 40px; background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.login-box h2 { text-align: center; margin-bottom: 24px; color: #001529; }
.login-box .form-group { margin-bottom: 16px; }
.login-box .btn-block { margin-top: 8px; }

.checkbox-inline { display: inline-flex; align-items: center; gap: 6px; margin-right: 12px; cursor: pointer; }
.checkbox-inline input { width: auto; }

h3 { font-size: 16px; margin: 20px 0 12px; color: #333; }

.permissions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.permission-group { padding: 12px; background: #fafafa; border-radius: 4px; border: 1px solid #f0f0f0; }
.permission-group h4 { font-size: 14px; margin-bottom: 8px; color: #1890ff; }
.permission-group .checkbox-inline { display: block; margin-bottom: 6px; }

.profile-card { display: flex; gap: 24px; padding: 24px; background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 20px; }
.profile-avatar { text-align: center; min-width: 120px; }
.avatar-circle { width: 80px; height: 80px; border-radius: 50%; background: #1890ff; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 8px; }
.profile-details { flex: 1; }

code { background: #f5f5f5; padding: 2px 6px; border-radius: 3px; font-size: 12px; color: #d63384; }

.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 20px; }
.dashboard-card { background: #fff; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.08); overflow: hidden; }
.card-header { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; background: #fafafa; border-bottom: 1px solid #f0f0f0; }
.card-header h3 { font-size: 15px; margin: 0; }
.card-body { padding: 16px 20px; }
.info-row { display: flex; padding: 8px 0; border-bottom: 1px solid #f5f5f5; }
.info-row:last-child { border-bottom: none; }
.info-label { flex: 0 0 100px; font-weight: 500; color: #666; font-size: 13px; }
.info-value { flex: 1; color: #333; word-break: break-all; }

.field-row { border: 1px solid #e8e8e8; border-radius: 6px; padding: 16px; margin-bottom: 12px; background: #fafafa; }
.field-row-inner { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.field-row-inner .form-group { margin-bottom: 0; }
.field-actions { display: flex; align-items: flex-end; justify-content: flex-end; }
