:root {
  color-scheme: dark;
  --bg: #101214;
  --panel: #171a1f;
  --panel-2: #1f242b;
  --panel-3: #12161b;
  --border: #333a44;
  --text: #eef2f5;
  --muted: #9aa6b2;
  --warn: #f2bd4d;
  --info: #65a7ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button,
.area-card {
  border: 1px solid var(--border);
  background: #20262e;
  color: var(--text);
  border-radius: 6px;
}

button {
  cursor: pointer;
  padding: 7px 9px;
}

button:hover,
.area-card:hover {
  border-color: var(--info);
}

input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #101419;
  color: var(--text);
  padding: 9px 11px;
}

.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: #13161a;
}

.topbar strong {
  margin-right: 10px;
  color: var(--warn);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.login-panel {
  position: fixed;
  inset: 56px 0 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 18, 20, 0.94);
  z-index: 10;
}

.login-panel[hidden] {
  display: none;
}

.login-box {
  width: min(360px, 100%);
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.login-box h1 {
  margin: 0 0 2px;
  font-size: 18px;
  line-height: 1.2;
}

.login-box label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.layout {
  min-height: calc(100vh - 56px);
  display: grid;
  place-items: start center;
  padding: 28px;
}

.panel {
  width: min(1220px, 100%);
  border: 1px solid var(--border);
  background: var(--panel);
}

.panel-title {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
  font-weight: 650;
}

.area-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.area-card {
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  text-decoration: none;
  background: var(--panel-3);
}

.area-card strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
}

.area-card span {
  color: var(--muted);
  line-height: 1.45;
}

.area-icon {
  width: 22px;
  height: 22px;
  display: inline-block;
  flex: 0 0 auto;
  color: var(--warn);
}

.area-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

@media (max-width: 980px) {
  .area-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .topbar {
    height: auto;
    min-height: 56px;
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 14px;
  }

  .layout {
    padding: 14px;
  }

  .area-grid {
    grid-template-columns: 1fr;
  }
}
