:root {
  color-scheme: dark;
  --bg: #0b1425;
  --sidebar: #101c30;
  --panel: #142239;
  --panel-hover: #192a43;
  --border: #243550;
  --text: #edf4ff;
  --muted: #8b9bb2;
  --blue: #2589ed;
  --blue-light: #54aaff;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f7fb;
  --sidebar: #ffffff;
  --panel: #ffffff;
  --panel-hover: #f1f6fd;
  --border: #e4eaf2;
  --text: #17243a;
  --muted: #77859a;
  --blue: #1976df;
  --blue-light: #4098f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  transition: background .2s, color .2s;
}

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

.sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--sidebar);
  border-right: 1px solid var(--border);
  padding: 27px 18px;
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
  padding-left: 5px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #1674dc, #29a5ff);
  color: white;
  font-weight: 800;
  font-size: 15px;
}

.brand h2 {
  margin: 0;
  font-size: 17px;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 2px;
  margin-top: 4px;
}

.nav-label {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.5px;
  margin: 0 0 13px 9px;
}

nav {
  display: grid;
  gap: 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  font-size: 13px;
}

.nav-item.active {
  color: white;
  background: var(--blue);
}

.nav-item:hover:not(.active) {
  background: var(--panel-hover);
  color: var(--text);
}

.settings-label {
  margin-top: 38px;
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

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

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--panel);
  display: grid;
  place-items: center;
  color: var(--muted);
}

.user-placeholder strong,
.user-placeholder span {
  display: block;
}

.user-placeholder strong {
  font-size: 12px;
}

.user-placeholder span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}

.main {
  flex: 1;
  min-width: 0;
  max-width: 1600px;
  margin: 0 auto;
  padding: 35px 42px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

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

h1 {
  font-size: 25px;
  margin: 7px 0 0;
}

.theme-toggle {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 17px;
}

.welcome {
  background: linear-gradient(110deg, #123c70, #155c9e 65%, #167dc0);
  border-radius: 14px;
  padding: 32px;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  opacity: .8;
}

.welcome h2 {
  font-size: 23px;
  margin: 12px 0 8px;
}

.welcome p {
  margin: 0;
  opacity: .8;
}

.welcome-icon {
  font-size: 65px;
  opacity: .4;
  padding-right: 20px;
}

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

.stat-card, .panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.stat-card {
  padding: 21px;
}

.stat-card > span {
  color: var(--muted);
  font-size: 12px;
}

.stat-card strong {
  display: block;
  font-size: 29px;
  margin: 13px 0 7px;
}

.stat-card small {
  color: var(--muted);
  font-size: 11px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
}

.panel {
  padding: 23px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-heading h3 {
  margin: 0;
  font-size: 15px;
}

.panel-heading p {
  color: var(--muted);
  font-size: 11px;
  margin: 7px 0 0;
}

.panel-icon {
  color: var(--blue-light);
  font-size: 19px;
}

.empty-state {
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

.empty-icon {
  font-size: 29px;
  color: var(--blue-light);
  margin-bottom: 14px;
}

.empty-state strong {
  font-size: 13px;
}

.empty-state p {
  font-size: 11px;
  color: var(--muted);
}

.quick-links {
  display: grid;
  gap: 5px;
  margin-top: 20px;
}

.quick-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 9px;
  border-radius: 9px;
  color: var(--text);
  text-decoration: none;
}

.quick-links a:hover {
  background: var(--panel-hover);
}

.quick-icon {
  background: rgba(37,137,237,.12);
  color: var(--blue-light);
  width: 35px;
  height: 35px;
  border-radius: 9px;
  display: grid;
  place-items: center;
}

.quick-links strong, .quick-links small {
  display: block;
}

.quick-links strong {
  font-size: 12px;
}

.quick-links small {
  color: var(--muted);
  margin-top: 4px;
  font-size: 10px;
}

.arrow {
  margin-left: auto;
  color: var(--muted);
}

footer {
  margin-top: 35px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}

@media(max-width: 1000px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(max-width: 700px) {
  .sidebar {
    width: 65px;
    padding: 20px 8px;
  }

  .brand {
    justify-content: center;
    padding: 0;
  }

  .brand > div:last-child,
  .nav-label,
  .nav-item span,
  .sidebar-bottom > div:last-child {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 13px 5px;
  }

  .settings-label {
    margin-top: 25px;
  }

  .main {
    padding: 25px 15px;
  }

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

  .welcome {
    padding: 23px;
  }

  .welcome-icon {
    display: none;
  }
}
