:root {
  --bg: #f6f5f7;
  --card: #ffffff;
  --ink: #202026;
  --muted: #777782;
  --line: #e9e7eb;

  --pink: #df5b91;
  --pink-deep: #ba3d6c;
  --pink-pale: #fce7ef;

  --green: #2f9b72;
  --green-deep: #237454;
  --green-pale: #e8f7ef;

  --gray-node: #c9c9d0;

  --shadow:
    0 14px 35px rgba(24, 20, 27, 0.08),
    0 2px 6px rgba(24, 20, 27, 0.035);

  --shadow-hover:
    0 20px 45px rgba(24, 20, 27, 0.12),
    0 4px 10px rgba(24, 20, 27, 0.045);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

/* Sidebar */

.sidebar {
  position: fixed;
  z-index: 30;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: 245px;
  padding: 22px 15px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 9px;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  border-radius: 10px;
  color: #ffffff;
  background: var(--ink);
  box-shadow: 0 5px 12px rgba(32, 32, 38, 0.17);
  letter-spacing: 0;
}

.workspace {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 32px 8px 18px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #faf9fb;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.workspace-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--pink);
  font-size: 0.72rem;
}

.menu {
  display: grid;
  gap: 5px;
}

.menu-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 0;
  border-radius: 11px;
  padding: 11px 12px;
  color: #6c6c77;
  background: transparent;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 730;
  transition:
    background 0.2s,
    color 0.2s,
    transform 0.2s;
}

.menu-button:hover {
  color: var(--ink);
  background: #f6f5f7;
}

.menu-button.active {
  color: var(--pink-deep);
  background: var(--pink-pale);
}

.menu-button:active {
  transform: scale(0.98);
}

.menu-icon {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-size: 1.02rem;
}

.sidebar-bottom {
  margin-top: auto;
}

.usage-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfafc;
}

.usage-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 0.8rem;
}

.usage-card span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.usage-bar {
  height: 5px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 99px;
  background: #ecebf0;
}

.usage-bar i {
  display: block;
  width: 35%;
  height: 100%;
  border-radius: 99px;
  background: var(--pink);
}

/* Application */

.app {
  width: calc(100% - 245px);
  margin-left: 245px;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding: 16px 36px;
  border-bottom: 1px solid rgba(233, 231, 235, 0.9);
  background: rgba(246, 245, 247, 0.86);
  backdrop-filter: blur(16px);
}

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

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--ink);
  background: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  transition:
    border-color 0.18s,
    color 0.18s,
    transform 0.18s;
}

.back-button:hover {
  border-color: var(--pink);
  color: var(--pink-deep);
  transform: translateX(-2px);
}

.back-button[hidden] {
  display: none;
}

.crumb {
  color: var(--muted);
  font-size: 0.85rem;
}

.crumb strong {
  color: var(--ink);
}

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

.round-button {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  background: #ffffff;
