/* Layout & nav */
* { box-sizing: border-box; }
/*body { font-family: Segoe UI, Arial, sans-serif; margin: 0; background: #f5f7fa; color: #333; }*/
body { font-family: Segoe UI, Arial, sans-serif; margin: 0; background: #f5f7fa; color: #333; }
a { color: #2a60ff; text-decoration: none; }
a:hover { text-decoration: underline; }
header { background: #fff; border-bottom: 1px solid #eaeefe; position: sticky; top: 0; z-index: 10; }
.nav { display: flex; gap: 18px; align-items: center; max-width: 1200px; margin: auto; padding: 12px 16px; }
.nav a { font-weight: 600; color: #1a2a6c; }
.nav .brand { margin-right: auto; font-size: 18px; }
.nav .auth { margin-left: auto; display:flex; gap:10px; align-items:center; }
.nav .auth .hint { color:#6b7280; font-size:12px; }
.container { max-width: 1200px; margin: 18px auto; padding: 0 16px; }
.grid { display: grid; gap: 16px; }
.card { background: #fff; border: 1px solid #e9edff; border-radius: 10px; padding: 14px; }
h2 { color: #1a2a6c; margin: 10px 0 12px 0; }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 12px; }
.kpi { background: #f8faff; border: 1px solid #e5ebff; border-radius: 10px; padding: 12px; text-align: center; }
.kpi .t { color: #5260a3; font-size: 0.85rem; }
.kpi .v { font-size: 1.3rem; font-weight: 800; color: #1a2a6c; }

/* Filters */
.filters { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 6px 0 10px 0; }
.filters label { display: flex; gap: 8px; align-items: center; font-weight: 600; color: #555; }
.filters select { padding: 6px 8px; border: 1.7px solid #ddd; border-radius: 6px; background: #fff; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
thead { background: #2a60ff; color: #fff; }
th, td { padding: 10px; border: 1px solid #eee; text-align: center; font-size: 0.92rem; }
tbody tr:hover { background: #f0f4ff; cursor: pointer; }

/* Charts */
.chart-wrap { width: 100%; height: 300px; position: relative; }
canvas { width: 100%; height: 100%; display: block; }
#chartTooltip { position: fixed; z-index: 1000; display: none; background: #fff; color: #1a2a6c; border: 1px solid #e0e5ff; border-radius: 6px; padding: 6px 8px; font-size: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.08); pointer-events: none; white-space: nowrap; }

/* Forms */
label { display: block; margin: 12px 0 4px 0; font-weight: 600; color: #555; }
input, select, textarea { width: 100%; padding: 8px 10px; border: 1.7px solid #ddd; border-radius: 6px; font-size: 1rem; }
textarea { min-height: 70px; resize: vertical; }
button { background: #2a60ff; color: #fff; border: none; border-radius: 8px; padding: 12px 16px; font-weight: 700; cursor: pointer; }
button:hover { background: #1549c3; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.hint { color: #666; font-size: .9rem; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 12px; margin-top: 12px; }
.pagination button { background: #2a60ff; color: #fff; border: none; padding: 8px 12px; border-radius: 6px; font-weight: 600; cursor: pointer; }
.pagination button[disabled] { opacity: .5; cursor: not-allowed; }

/* Images */
.img { max-width: 80px; max-height: 60px; border-radius: 6px; }

/* Details */
.details-table th { text-align: left; width: 220px; }
.details-table td { text-align: left; }

/* Responsive */
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .row { grid-template-columns: 1fr; }
}