:root {
  --navy: #10264b;
  --blue: #2563eb;
  --blue2: #eff6ff;
  --bg: #f5f7fb;
  --white: #fff;
  --text: #172033;
  --muted: #667085;
  --border: #e2e8f0;
  --green: #067647;
  --green-bg: #ecfdf3;
  --orange: #b54708;
  --orange-bg: #fffaeb;
  --red: #b42318;
  --red-bg: #fef3f2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
}

/* Sidebar */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 235px;
  background: var(--navy);
  color: #fff;
  padding: 24px 16px;
  z-index: 1000;
}

.logo {
  font-size: 18px;
  font-weight: 800;
  padding: 0 12px 28px;
}

.logo span {
  display: block;
  font-size: 11px;
  font-weight: 400;
  opacity: 0.65;
  margin-top: 5px;
}

.nav-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.5;
  padding: 12px;
}

.nav a {
  display: block;
  color: #dbe5f5;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 7px;
  font-size: 13px;
  margin: 3px 0;
  transition: all 0.2s ease;
}

.nav a.active {
  background: #234477;
  color: #fff;
  font-weight: 700;
}

.nav a:hover {
  background: #1b3765;
}

/* Main Layout */
.main {
  width: 100%;
  min-height: 100vh;
}

/* Topbar */
.topbar {
  height: 72px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
}

.page-title {
  font-size: 18px;
  font-weight: 750;
}

.page-subtitle {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.user {
  font-size: 12px;
  color: var(--muted);
}

/* Content */
.content {
  padding: 25px 30px;
  width: 100%;
}

/* Toolbar */
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filters {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}

input,
select,
button {
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  padding: 0 11px;
  font-size: 12px;
  color: var(--text);
}

button {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

button:hover {
  opacity: 0.9;
}

button.secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

/* Live Status */
.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 20px;
  background: var(--green-bg);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.live.checking {
  color: var(--muted);
  background: #f2f4f7;
}

.live.offline {
  color: var(--red);
  background: var(--red-bg);
}

.dot {
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
}

/* KPIs */
.kpis {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.kpi {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 15px;
  box-shadow: 0 2px 7px rgba(16, 24, 40, 0.03);
}

.kpi-label {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.35;
}

.kpi-value {
  font-size: 24px;
  font-weight: 800;
  margin-top: 8px;
}

.kpi-change {
  font-size: 10px;
  color: var(--green);
  margin-top: 6px;
}

.kpi-change.change-down {
  color: var(--red);
}

.kpi-change.change-up {
  color: var(--green);
}

.kpi-change.change-same {
  color: var(--blue);
}

/* Panel */
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 20px;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 17px;
  border-bottom: 1px solid var(--border);
}

.panel-title {
  font-size: 14px;
  font-weight: 750;
}

.panel-meta {
  font-size: 11px;
  color: var(--muted);
}

/* Table */
.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1250px;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

th {
  background: #f8fafc;
  color: #475467;
  font-weight: 700;
}

th:first-child,
td:first-child {
  text-align: left;
}

.hospital {
  font-weight: 700;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 700;
}

.online {
  color: var(--green);
  background: var(--green-bg);
}

.warning {
  color: var(--orange);
  background: var(--orange-bg);
}

.offline {
  color: var(--red);
  background: var(--red-bg);
}

.grand td {
  background: #f1f5f9;
  font-weight: 800;
}

/* Grid Layout */
.grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
}

/* Chart */
.chart {
  height: 245px;
  padding: 20px;
}

.bar-row {
  display: grid;
  grid-template-columns: 130px 1fr 50px;
  gap: 10px;
  align-items: center;
  margin: 13px 0;
  font-size: 11px;
}

.bar-bg {
  height: 9px;
  background: #e8edf5;
  border-radius: 10px;
  overflow: hidden;
}

.bar {
  height: 100%;
  background: var(--blue);
  border-radius: 10px;
}

/* Sync List */
.sync-list {
  padding: 8px 17px 16px;
}

.sync-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 80px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid #eef2f6;
  font-size: 11px;
}

.sync-row:last-child {
  border-bottom: 0;
}

/* Footer */
.footer {
  font-size: 10px;
  color: var(--muted);
  padding: 3px 0 25px;
}

/* Responsive */
@media (max-width: 1200px) {
  .kpis {
    grid-template-columns: repeat(4, 1fr);
  }
  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .sidebar {
    display: none;
  }
  .main {
    margin-left: 0;
  }
  .content {
    padding: 18px;
  }
  .topbar {
    padding: 0 18px;
  }
  .kpis {
    grid-template-columns: repeat(2, 1fr);
  }
}
