:root {
  font-family: Inter, system-ui, Arial, sans-serif;
  color: #18253a;
  background: #f3f6fb;
}

* { box-sizing: border-box; }
body { margin: 0; }
.hidden { display: none !important; }

button, input { font: inherit; }
button { cursor: pointer; }

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  background: linear-gradient(135deg, #101f38, #244c84);
}

.login-card {
  background: white;
  border-radius: 18px;
  width: min(100%, 400px);
  padding: 38px;
  box-shadow: 0 20px 70px #0003;
}

.logo {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 12px;
  background: #3279d6;
  color: white;
  font-size: 23px;
  font-weight: 800;
}

.login-card h1 { margin-bottom: 4px; }
.login-card p, header p, .panel-header p {
  color: #738198;
}

.login-card label {
  display: block;
  margin: 19px 0 7px;
  font-weight: 600;
  font-size: 13px;
}

input {
  border: 1px solid #dbe3ee;
  border-radius: 9px;
  padding: 12px;
  outline-color: #3279d6;
}

.login-card input { width: 100%; }

.login-card button {
  width: 100%;
  margin-top: 25px;
  padding: 13px;
  background: #3279d6;
  color: white;
  border: 0;
  border-radius: 9px;
  font-weight: 700;
}

.error { color: #c33434; margin-top: 12px; }

.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 245px;
  background: #14243e;
  color: white;
  padding: 25px 15px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 35px;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: #9cb1ce;
  font-size: 10px;
  letter-spacing: 2px;
}

nav a {
  display: block;
  color: #b9c9e1;
  padding: 14px;
  text-decoration: none;
  border-radius: 9px;
  margin-bottom: 5px;
}

nav a.selected, nav a:hover {
  background: #29466e;
  color: white;
}

.sidebar-footer { margin-top: auto; }

.logout {
  background: transparent;
  border: 1px solid #52637b;
  color: white;
  padding: 10px;
  border-radius: 8px;
  width: 100%;
}

.content {
  flex: 1;
  padding: 35px;
  min-width: 0;
}

header, .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

header h1 { margin-bottom: 4px; }

.online, .status {
  background: #e3f7eb;
  color: #16814c;
  padding: 7px 12px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 700;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin: 30px 0;
}

.stat, .panel {
  background: white;
  border: 1px solid #e6ebf3;
  border-radius: 13px;
  box-shadow: 0 3px 14px #172b4608;
}

.stat { padding: 23px; }
.stat span { color: #74829a; font-size: 13px; }
.stat strong {
  display: block;
  font-size: 31px;
  margin-top: 13px;
}

.panel { padding: 25px; }
.panel-header { margin-bottom: 20px; }
.panel-header h2 { margin-bottom: 4px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  padding: 17px 12px;
  text-align: left;
  border-bottom: 1px solid #edf0f5;
}
th { color: #79869a; font-size: 12px; }
td { font-size: 14px; }

.progress {
  width: 110px;
  height: 6px;
  background: #e9eef5;
  border-radius: 8px;
  margin-top: 7px;
  overflow: hidden;
}

.progress div {
  height: 100%;
  background: #3279d6;
}

@media (max-width: 900px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .sidebar { width: 190px; }
  .content { padding: 20px; }
}

@media (max-width: 600px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; }
  .sidebar nav { display: flex; gap: 8px; }
  .sidebar-footer { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  header, .panel-header { align-items: flex-start; flex-direction: column; }
}
