* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f0f2f5; color: #333; }
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #1a1d29; color: #fff; padding: 20px 0; flex-shrink: 0; }
.sidebar .brand { padding: 0 20px 20px; font-size: 16px; font-weight: 600; border-bottom: 1px solid #2d3148; }
.sidebar nav a { display: block; padding: 10px 20px; color: #a0a8c0; text-decoration: none; font-size: 14px; }
.sidebar nav a:hover, .sidebar nav a.active { background: #2d3148; color: #fff; }
.main { flex: 1; padding: 24px; overflow-x: auto; }
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
.page-header h1 { font-size: 22px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 8px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stat-card.highlight { border-left: 4px solid #4f6ef7; }
.stat-label { font-size: 13px; color: #888; margin-bottom: 6px; }
.stat-value { font-size: 24px; font-weight: 600; }
.section-title { font-size: 16px; margin-bottom: 12px; color: #555; }
.card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; font-size: 14px; }
.table th { background: #fafafa; font-weight: 600; }
.table-sm th, .table-sm td { padding: 6px 8px; font-size: 13px; }
.btn { display: inline-block; padding: 8px 16px; border: 1px solid #ddd; border-radius: 6px; background: #fff; cursor: pointer; font-size: 14px; text-decoration: none; color: #333; }
.btn-primary { background: #4f6ef7; color: #fff; border-color: #4f6ef7; }
.btn-danger { background: #e74c3c; color: #fff; border-color: #e74c3c; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.input-sm { width: 100px; padding: 4px 8px; border: 1px solid #ddd; border-radius: 4px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.form-stack label { display: block; margin-bottom: 12px; font-size: 14px; }
.form-stack input, .form-stack textarea, .form-stack select { display: block; width: 100%; margin-top: 4px; padding: 8px; border: 1px solid #ddd; border-radius: 6px; }
.form-actions { margin-top: 12px; }
.inline-form { display: inline-flex; gap: 4px; align-items: center; }
.search-form { display: flex; gap: 8px; }
.search-form input { padding: 8px; border: 1px solid #ddd; border-radius: 6px; }
.badge { padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.badge.success { background: #d4edda; color: #155724; }
.badge.danger { background: #f8d7da; color: #721c24; }
.text-green { color: #27ae60; }
.text-red { color: #e74c3c; }
.hint { font-size: 13px; color: #888; margin: 8px 0; }
.tabs a { margin-right: 12px; text-decoration: none; color: #666; padding-bottom: 4px; }
.tabs a.active { color: #4f6ef7; border-bottom: 2px solid #4f6ef7; }
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.1); width: 360px; }
.login-box h1 { text-align: center; margin-bottom: 24px; font-size: 20px; }
.login-box label { display: block; margin-bottom: 12px; font-size: 14px; }
.login-box input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px; margin-top: 4px; }
.login-box button { width: 100%; margin-top: 8px; }
.alert { padding: 10px; border-radius: 6px; margin-bottom: 12px; }
.alert-error { background: #f8d7da; color: #721c24; }
.toast { position: fixed; top: 20px; right: 20px; padding: 12px 20px; border-radius: 8px; color: #fff; z-index: 9999; animation: fadeIn .3s; }
.toast.success { background: #27ae60; }
.toast.error { background: #e74c3c; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; } }
code { background: #f4f4f4; padding: 2px 6px; border-radius: 4px; font-size: 13px; }
