:root {
  --bg: #f5f7fb;
  --sidebar-bg: #ffffff;
  --accent: #3b82f6;
  --accent-strong: #2563eb;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(31, 41, 55, 0.08);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  transition: grid-template-columns 0.3s ease;
}

.sidebar {
  background: var(--sidebar-bg);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  position: relative;
  border-right: 1px solid var(--border);
  box-shadow: 12px 0 40px rgba(15, 23, 42, 0.05);
}

.brand {
  display: flex;
  align-items: center;
  margin-bottom: 36px;
}

.logo {
  font-size: 28px;
  margin-right: 12px;
}

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

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  border: none;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-item:hover,
.nav-item:focus-visible {
  color: var(--accent-strong);
  background: rgba(59, 130, 246, 0.12);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.nav-item .icon {
  font-size: 18px;
  width: 26px;
  text-align: center;
}

.toggle {
  position: absolute;
  right: -14px;
  bottom: 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.3);
  display: none;
}

.content {
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

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

.content-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.content-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

.primary-btn,
.ghost-btn {
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.primary-btn:hover {
  transform: translateY(-1px);
}

.ghost-btn {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

.tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tab {
  padding: 9px 16px;
  border-radius: 24px;
  border: 1px solid transparent;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: all 0.2s ease;
}

.tab.active {
  color: var(--accent-strong);
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.12);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.08);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.card-desc {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-actions a {
  font-size: 13px;
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 600;
}

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

.empty-state {
  grid-column: 1 / -1;
  background: rgba(59, 130, 246, 0.05);
  border: 1px dashed rgba(59, 130, 246, 0.3);
  padding: 40px 0;
  text-align: center;
  border-radius: 16px;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  padding: 12px 24px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  border-radius: 24px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 25;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, -6px);
}

@media (max-width: 960px) {
  body {
    grid-template-columns: 0 1fr;
  }
  .sidebar {
    position: fixed;
    left: -240px;
    top: 0;
    bottom: 0;
    z-index: 30;
    transition: transform 0.3s ease;
  }
  .sidebar.open {
    transform: translateX(240px);
  }
  .toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .content {
    padding: 32px 20px;
  }
  .content-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
