* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f5f7;
  color: #222;
}

.topbar {
  height: 52px;
  background: #30343b;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.brand {
  font-size: 19px;
  font-weight: 600;
}

.user {
  display: flex;
  gap: 16px;
  align-items: center;
}

.user a {
  color: #fff;
  text-decoration: none;
}

.layout {
  display: flex;
  min-height: calc(100vh - 52px);
}

.sidebar {
  width: 220px;
  background: #e7e9ec;
  border-right: 1px solid #c7cbd0;
  padding: 12px 0;
}

.sidebar a {
  display: block;
  padding: 10px 18px;
  color: #222;
  text-decoration: none;
}

.sidebar a:hover,
.sidebar a.active {
  background: #d3d7dc;
  font-weight: 600;
}

.content {
  flex: 1;
  padding: 24px;
}

.content h1 {
  margin-top: 0;
  font-size: 26px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.card,
.panel {
  background: white;
  border: 1px solid #ccd0d5;
  border-radius: 3px;
  padding: 18px;
}

.card-label {
  font-size: 14px;
  color: #666;
}

.card-value {
  font-size: 30px;
  margin-top: 6px;
}

.panel h2 {
  margin-top: 0;
  font-size: 19px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #ddd;
  padding: 9px 8px;
  text-align: left;
}

th {
  background: #eef0f2;
}

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.login-box {
  width: 360px;
  background: white;
  padding: 28px;
  border: 1px solid #c8ccd1;
  border-radius: 3px;
}

.login-box h1 {
  margin-top: 0;
  font-size: 24px;
}

.login-box label {
  display: block;
  margin-top: 14px;
  margin-bottom: 5px;
}

.login-box input {
  width: 100%;
  padding: 9px;
  border: 1px solid #aaa;
}

.login-box button {
  margin-top: 20px;
  padding: 9px 18px;
  cursor: pointer;
}

.alert-error {
  background: #fbe8e8;
  border: 1px solid #d69b9b;
  padding: 10px;
  margin-bottom: 14px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 2fr 0.7fr 1fr 1fr 1fr 1.2fr;
  gap: 12px;
  align-items: end;
}

.filter-grid label {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.filter-grid input[type="text"],
.filter-grid input:not([type]),
.filter-grid select {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #aaa;
  background: white;
}

.filter-check {
  display: flex;
  align-items: center;
  min-height: 34px;
}

.filter-check label {
  margin: 0;
}

.filter-actions {
  display: flex;
  gap: 8px;
}

.filter-actions button,
.button-secondary {
  display: inline-block;
  padding: 8px 14px;
  border: 1px solid #999;
  background: #e7e9ec;
  color: #222;
  text-decoration: none;
  cursor: pointer;
}

.table-toolbar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.table-scroll {
  overflow-x: auto;
}

tbody tr:hover {
  background: #f4f6f8;
}

@media (max-width: 1200px) {
  .filter-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
