* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 14px; background: #f5f6fa; color: #2d3436; }
a { text-decoration: none; color: inherit; }

/* Layout */
.topbar { background: #fff; border-bottom: 1px solid #e8e8e8; padding: 0 24px; height: 54px; display: flex; align-items: center; justify-content: space-between; position: fixed; top: 0; left: 0; right: 0; z-index: 100; }
.topbar-logo { font-size: 15px; font-weight: 600; color: #0F6E56; display: flex; align-items: center; gap: 8px; }
.topbar-logo svg { width: 22px; height: 22px; }
.topbar-right { display: flex; align-items: center; gap: 16px; font-size: 13px; color: #636e72; }
.topbar-right a { color: #636e72; }
.topbar-right a:hover { color: #0F6E56; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #E1F5EE; color: #0F6E56; font-weight: 600; font-size: 12px; display: flex; align-items: center; justify-content: center; }

.sidebar { position: fixed; left: 0; top: 54px; bottom: 0; width: 210px; background: #fff; border-right: 1px solid #e8e8e8; overflow-y: auto; padding: 12px 0; }
.nav-group { margin-bottom: 8px; }
.nav-group-label { font-size: 10px; font-weight: 600; color: #b2bec3; text-transform: uppercase; letter-spacing: 0.08em; padding: 8px 16px 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 13px; color: #636e72; cursor: pointer; transition: all 0.15s; border-left: 3px solid transparent; }
.nav-item:hover { background: #f8f9fa; color: #2d3436; }
.nav-item.active { background: #E1F5EE; color: #0F6E56; font-weight: 500; border-left-color: #0F6E56; }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }

.main { margin-left: 210px; margin-top: 54px; padding: 24px; min-height: calc(100vh - 54px); }

/* Cards */
.card { background: #fff; border-radius: 10px; border: 1px solid #e8e8e8; margin-bottom: 20px; }
.card-header { padding: 14px 20px; border-bottom: 1px solid #e8e8e8; display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 14px; font-weight: 600; color: #2d3436; }
.card-body { padding: 20px; }

/* Page header */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-title { font-size: 20px; font-weight: 600; color: #2d3436; }
.breadcrumb { font-size: 12px; color: #b2bec3; margin-top: 2px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }
.stat-card { background: #fff; border-radius: 10px; border: 1px solid #e8e8e8; padding: 16px; }
.stat-label { font-size: 12px; color: #636e72; margin-bottom: 8px; }
.stat-value { font-size: 22px; font-weight: 600; color: #2d3436; }
.stat-sub { font-size: 11px; color: #b2bec3; margin-top: 4px; }
.stat-icon { width: 36px; height: 36px; border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.stat-icon svg { width: 18px; height: 18px; }
.si-green { background: #E1F5EE; color: #0F6E56; }
.si-blue { background: #E6F1FB; color: #185FA5; }
.si-amber { background: #FAEEDA; color: #854F0B; }
.si-red { background: #FCEBEB; color: #A32D2D; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 10px 16px; text-align: left; font-size: 11px; font-weight: 600; color: #b2bec3; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid #e8e8e8; background: #fafafa; }
td { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; color: #2d3436; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-success { background: #E1F5EE; color: #0F6E56; }
.badge-warning { background: #FAEEDA; color: #854F0B; }
.badge-info { background: #E6F1FB; color: #185FA5; }
.badge-danger { background: #FCEBEB; color: #A32D2D; }
.badge-gray { background: #f1f2f6; color: #636e72; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; border: 1px solid #e8e8e8; background: #fff; color: #2d3436; transition: all 0.15s; }
.btn:hover { background: #f5f6fa; }
.btn-primary { background: #0F6E56; color: #fff; border-color: #0F6E56; }
.btn-primary:hover { background: #085041; }
.btn-danger { background: #FCEBEB; color: #A32D2D; border-color: #f7c1c1; }
.btn-danger:hover { background: #f7c1c1; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn svg { width: 15px; height: 15px; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1/-1; }
.form-label { font-size: 12px; font-weight: 600; color: #636e72; }
.form-control { padding: 8px 12px; border: 1px solid #e8e8e8; border-radius: 8px; font-size: 13px; color: #2d3436; background: #fff; transition: border 0.15s; width: 100%; }
.form-control:focus { outline: none; border-color: #0F6E56; box-shadow: 0 0 0 3px rgba(15,110,86,0.08); }
textarea.form-control { resize: vertical; min-height: 90px; }

/* Search */
.search-wrap { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.search-box { flex: 1; display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e8e8e8; border-radius: 8px; padding: 7px 12px; }
.search-box svg { width: 15px; height: 15px; color: #b2bec3; flex-shrink: 0; }
.search-box input { border: none; outline: none; font-size: 13px; color: #2d3436; flex: 1; background: none; }

/* Progress bar */
.progress-wrap { display: flex; align-items: center; gap: 8px; }
.progress-bar { flex: 1; height: 5px; background: #f0f0f0; border-radius: 3px; overflow: hidden; min-width: 80px; }
.progress-fill { height: 100%; background: #0F6E56; border-radius: 3px; }

/* Alert */
.alert { padding: 10px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.alert-success { background: #E1F5EE; color: #0F6E56; border: 1px solid #9FE1CB; }
.alert-danger { background: #FCEBEB; color: #A32D2D; border: 1px solid #f7c1c1; }

/* Action icons */
.action-btns { display: flex; gap: 4px; }
.icon-btn { width: 30px; height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center; border: 1px solid #e8e8e8; background: #fff; cursor: pointer; color: #636e72; transition: all 0.15s; }
.icon-btn:hover { background: #f5f6fa; color: #2d3436; }
.icon-btn.del:hover { background: #FCEBEB; color: #A32D2D; border-color: #f7c1c1; }
.icon-btn svg { width: 14px; height: 14px; }

/* Login */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: #f5f6fa; }
.login-card { background: #fff; border-radius: 12px; border: 1px solid #e8e8e8; padding: 36px; width: 380px; }
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo h2 { font-size: 20px; font-weight: 600; color: #0F6E56; margin-top: 8px; }
.login-logo p { font-size: 12px; color: #b2bec3; margin-top: 4px; }

/* Two col dashboard */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: 1; }
}
