:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #1d4ed8;
  --primary-2: #2563eb;
  --sidebar: #0f172a;
  --sidebar-2: #111827;
  --sidebar-text: #e5e7eb;
  --sidebar-muted: #94a3b8;
  --danger: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  overflow: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font: inherit;
}

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

.sidebar {
  width: 280px;
  min-width: 280px;
  background: linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-top {
  padding: 24px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #1e40af);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 20px;
  color: #fff;
}

.logo-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.logo-sub {
  font-size: 12px;
  color: var(--sidebar-muted);
  margin-top: 4px;
}

.menu {
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.menu-section-title {
  font-size: 12px;
  color: var(--sidebar-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 10px 12px;
}

.menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--sidebar-text);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  transition: 0.2s ease;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.06);
}

.menu-item.is-active {
  background: rgba(37, 99, 235, 0.18);
  border-color: rgba(37, 99, 235, 0.35);
}

.menu-btn {
  appearance: none;
}

.menu-label {
  font-size: 14px;
  font-weight: 600;
}

.sidebar-bottom {
  padding: 16px 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.logout-btn {
  width: 100%;
  min-height: 44px;
  border: none;
  border-radius: 12px;
  background: rgba(220, 38, 38, 0.18);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.logout-btn:hover {
  background: rgba(220, 38, 38, 0.28);
}

.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  min-height: 78px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-left h1 {
  margin: 0;
  font-size: 24px;
}

.topbar-left p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.user-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
}

.user-chip-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.content {
  padding: 24px;
  overflow: auto;
}

.hero-card,
.card,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 26px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.hero-card h2 {
  margin: 0 0 10px;
  font-size: 28px;
}

.hero-card p {
  margin: 0;
  max-width: 780px;
  color: var(--muted);
  line-height: 1.6;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.card {
  padding: 20px;
}

.card-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.55;
}

.card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.card-link:hover {
  background: var(--primary-2);
}

.card-link-btn {
  border: none;
  cursor: pointer;
}

.panel {
  margin-bottom: 22px;
}

.panel-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.panel-head h3 {
  margin: 0;
  font-size: 18px;
}

.panel-body {
  padding: 18px 20px 20px;
}

.notes {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.hidden {
  display: none !important;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 10px;
  cursor: pointer;
}

.mobile-only {
  display: none;
}

@media (max-width: 980px) {
  .grid-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    height: 100vh;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main-area {
    width: 100%;
  }

  .mobile-only {
    display: inline-grid;
    place-items: center;
  }

  .topbar {
    padding: 14px 16px;
  }

  .content {
    padding: 16px;
  }

  .topbar-left h1 {
    font-size: 20px;
  }

  .user-chip {
    padding: 8px 10px;
  }
}