* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', sans-serif; background: #f0f2f5; color: #333; font-size: 14px; }
a { color: #16a34a; text-decoration: none; }

/* Layout */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 224px; background: linear-gradient(180deg,#001529 0%,#001d35 100%); color: #fff; position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; z-index: 100; }
.sidebar-logo { padding: 22px 20px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 16px; font-weight: 700; letter-spacing: .5px; }
.sidebar-logo svg { width: 24px; height: 24px; color: #4ade80; flex-shrink: 0; }
.sidebar-menu { list-style: none; padding: 8px 8px; }
.sidebar-menu li { padding: 11px 16px; cursor: pointer; transition: all .2s; font-size: 14px; display: flex; align-items: center; gap: 10px; border-radius: 8px; margin-bottom: 2px; color: rgba(255,255,255,.7); }
.sidebar-menu li:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-menu li.active { background: #16a34a; color: #fff; font-weight: 500; box-shadow: 0 2px 8px rgba(22,163,74,.3); }
.sidebar-menu li svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.sidebar-menu li.active svg { opacity: 1; }
.main { flex: 1; margin-left: 224px; }
.header { background: #fff; padding: 0 24px; height: 56px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 50; }
.header-title { font-size: 17px; font-weight: 600; }
.header-user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #666; cursor: pointer; padding: 6px 14px; border-radius: 6px; transition: background .15s; }
.header-user:hover { background: #f5f5f5; }
.header-user svg { width: 16px; height: 16px; }
.content { padding: 24px; }

/* Login */
.login-page { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: linear-gradient(135deg, #16a34a 0%, #059669 50%, #0d9488 100%); }
.login-box { background: #fff; border-radius: 16px; padding: 44px 36px 36px; width: 400px; box-shadow: 0 12px 40px rgba(0,0,0,.15); }
.login-title { font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 32px; color: #333; display: flex; align-items: center; justify-content: center; gap: 10px; }
.login-title svg { width: 28px; height: 28px; color: #16a34a; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: flex; align-items: center; gap: 4px; font-size: 14px; color: #666; margin-bottom: 6px; }
.form-group label svg { width: 14px; height: 14px; }
.form-group input, .form-group select, .form-group textarea {
	width: 100%; padding: 10px 12px; border: 1.5px solid #d9d9d9; border-radius: 8px; font-size: 14px; outline: none; transition: border .2s, box-shadow .2s;
}
.form-group input:focus, .form-group select:focus { border-color: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.1); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 10px 20px; border: none; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; transition: all .15s; }
.btn:active { transform: scale(.98); }
.btn-primary { background: #16a34a; color: #fff; }
.btn-primary:hover { background: #15803d; }
.btn-danger { background: #e53935; color: #fff; }
.btn-danger:hover { background: #c62828; }
.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; border-radius: 10px; }
.btn-outline { background: transparent; border: 1.5px solid #d9d9d9; color: #333; }
.btn svg { width: 14px; height: 14px; }

/* Stats Cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 10px; padding: 22px 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%; border-radius: 4px 0 0 4px; }
.stat-card:nth-child(1)::before { background: #16a34a; }
.stat-card:nth-child(2)::before { background: #16a34a; }
.stat-card:nth-child(3)::before { background: #3b82f6; }
.stat-card:nth-child(4)::before { background: #8b5cf6; }
.stat-card:nth-child(5)::before { background: #ef4444; }
.stat-card .label { font-size: 13px; color: #999; margin-bottom: 8px; }
.stat-card .value { font-size: 28px; font-weight: 700; color: #333; }
.stat-card .value.green { color: #16a34a; }
.stat-card .value.red { color: #e53935; }

.card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.06); margin-bottom: 16px; }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 8px; }
.card-title svg { width: 18px; height: 18px; color: #16a34a; }

/* Table */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 12px; }
.search-box { display: flex; gap: 8px; }
.search-box input { padding: 8px 12px; border: 1.5px solid #d9d9d9; border-radius: 8px; font-size: 13px; width: 220px; outline: none; transition: border .2s; }
.search-box input:focus { border-color: #16a34a; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid #f0f0f0; }
th { background: #fafafa; font-weight: 600; color: #666; white-space: nowrap; font-size: 12px; }
tr:hover { background: #fafbfc; }
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; }
.badge-green { background: #dcfce7; color: #16a34a; }
.badge-yellow { background: #fef9c3; color: #ca8a04; }
.badge-red { background: #fee2e2; color: #e53935; }
.badge-gray { background: #f3f4f6; color: #6b7280; }
.actions { display: flex; gap: 6px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.pagination button { padding: 6px 14px; border: 1.5px solid #d9d9d9; border-radius: 6px; background: #fff; cursor: pointer; font-size: 13px; transition: all .15s; }
.pagination button:hover:not(:disabled) { border-color: #16a34a; color: #16a34a; }
.pagination button.active { background: #16a34a; color: #fff; border-color: #16a34a; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* Modal */
.modal-mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.45); z-index: 1000; display: flex; justify-content: center; align-items: center; }
.modal { background: #fff; border-radius: 12px; width: 520px; max-height: 80vh; overflow-y: auto; box-shadow: 0 16px 48px rgba(0,0,0,.15); }
.modal-header { padding: 18px 24px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 16px; font-weight: 600; }
.modal-close { cursor: pointer; font-size: 20px; color: #999; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 6px; }
.modal-close:hover { background: #f5f5f5; }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 12px 24px; border-top: 1px solid #f0f0f0; display: flex; justify-content: flex-end; gap: 8px; }

/* Empty */
.empty { text-align: center; padding: 60px 0; color: #999; }
.empty svg { width: 48px; height: 48px; color: #ddd; margin-bottom: 12px; display: block; margin-left: auto; margin-right: auto; }

/* Utility */
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.hidden { display: none !important; }
