:root {
  --ink: #111111;
  --muted: #666666;
  --surface: #ffffff;
  --line: #e5e5e5;
  --violet: #111111;
  --violet-dark: #000000;
  --violet-soft: #f0f0f0;
  --cyan: #43d7d0;
  --amber: #ffbf47;
  --pink: #FF7B74;
  --success: #FF7B74;
  --danger: #dc4a5d;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 16px 45px rgba(0, 0, 0, .09);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: #F4F3EF;
  font-family: "Inter", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.display-font { font-family: "Inter", sans-serif; font-weight: 800; letter-spacing: -.04em; }
.text-muted { color: var(--muted); }
.text-violet { color: var(--violet); }

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  gap: 18px;
  text-align: center;
  background: #ffffff;
}
.boot-logo {
  width: min(230px, 62vw);
  height: auto;
  margin: auto;
  filter: grayscale(1) brightness(0);
}
.boot-loader {
  width: 42px;
  height: 2px;
  margin: 4px auto 0;
  overflow: hidden;
  border-radius: 99px;
  background: #e5e5e5;
  position: relative;
}
.boot-loader::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 45%;
  border-radius: inherit;
  background: #111;
  animation: boot-loading 1s ease-in-out infinite;
}
.boot-screen p {
  margin: 0;
  color: #6b6b6b;
  font-size: 12px;
}
@keyframes boot-loading {
  from { transform: translateX(-110%); }
  to { transform: translateX(245%); }
}
.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  color: white;
  background: var(--violet);
  font-weight: 800;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}
.boot-screen .brand-mark { margin: auto; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  width: 252px;
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  background: #0b0b0b;
  color: #F4F3EF;
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.sidebar-brand strong { display: block; font-size: 18px; }
.sidebar-brand span { display: block; color: #aaaaaa; font-size: 11px; margin-top: 2px; }
.brand-logo-image { display: block; width: 170px; height: auto; object-fit: contain; }
.brand-logo-white { filter: brightness(0) invert(1); }
.side-nav { display: grid; gap: 5px; }
.side-link {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 47px;
  padding: 0 13px;
  border-radius: 13px;
  color: #aaaaaa;
  font-size: 14px;
  font-weight: 600;
  transition: .2s ease;
}
.side-link:hover { color: #F4F3EF; background: rgba(244,243,239,.06); }
.side-link.active { color: #111; background: #ffffff; box-shadow: 0 10px 22px rgba(0,0,0,.24); }
.side-link i { width: 19px; height: 19px; }
.sidebar-footer { margin-top: auto; }
.upgrade-card { padding: 17px; border-radius: 17px; background: linear-gradient(145deg, #242424, #171717); border: 1px solid #383838; }
.upgrade-card p { margin: 7px 0 14px; color: #aaaaaa; font-size: 12px; line-height: 1.5; }

.app-main { margin-left: 252px; min-height: 100vh; }
.topbar {
  height: 78px;
  padding: 0 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(248,248,248,.9);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.page-container { max-width: 1250px; margin: 0 auto; padding: 30px 34px 60px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.page-header h1 { margin: 0; font-size: clamp(28px, 4vw, 41px); line-height: 1.05; }
.page-header p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 7px 30px rgba(0,0,0,.04); }
.card-pad { padding: 22px; }
.card-hover { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card-hover:hover { transform: translateY(-3px); border-color: #bdbdbd; box-shadow: var(--shadow); }

.btn { min-height: 44px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; font-size: 13px; font-weight: 700; transition: .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: #101010; box-shadow: none; }
.btn-primary:hover { background: #0a0a0a; }
.btn-dark { color: #fff; background: #101010; }
.btn-soft { color: var(--violet-dark); background: var(--violet-soft); }
.btn-ghost { color: var(--ink); background: #ffffff; border: 1px solid var(--line); }
.btn-sm { min-height: 36px; padding: 0 13px; font-size: 12px; }
.btn-block { width: 100%; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 13px; background: #ffffff; color: var(--ink); position: relative; }
.icon-btn i { width: 18px; }
.notification-dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border: 2px solid #F4F3EF; border-radius: 50%; background: var(--pink); }

.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 25px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge-violet { color: #fff; background: #101010; }
.badge-green { color: #FF7B74; background: #fff0ee; }
.badge-amber { color: #966207; background: #fff3d7; }
.badge-gray { color: #626262; background: #f1f1f1; }
.badge-pink { color: #b54740; background: #fde9e8; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.stack { display: grid; gap: 16px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin: 30px 0 15px; }
.section-head h2 { margin: 0; font-size: 18px; }
.section-head a, .section-head button { color: var(--violet); font-size: 12px; font-weight: 700; }

.progress { height: 7px; overflow: hidden; border-radius: 99px; background: #ececec; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--violet); }
.avatar { display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; color: #F4F3EF; background: var(--violet); font-weight: 800; }
.avatar-sm { width: 38px; height: 38px; font-size: 12px; }
.avatar-md { width: 52px; height: 52px; }
.empty-state { padding: 45px 20px; text-align: center; color: var(--muted); }
.empty-state i { width: 34px; height: 34px; color: var(--violet); margin-bottom: 10px; }

.form-group { display: grid; gap: 7px; }
.form-label { font-size: 12px; font-weight: 700; color: #424242; }
.form-input { width: 100%; height: 45px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; outline: none; background: #ffffff; color: var(--ink); }
textarea.form-input { min-height: 100px; padding-top: 12px; resize: vertical; }
.form-input:focus { border-color: #111; box-shadow: 0 0 0 3px rgba(0,0,0,.1); }

.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: 360px; padding: 15px 18px; display: flex; gap: 11px; align-items: center; border-radius: 14px; color: #F4F3EF; background: #111; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.toast i { color: var(--cyan); }
.fade-enter-active,.fade-leave-active { transition: opacity .18s ease, transform .18s ease; }
.fade-enter-from,.fade-leave-to { opacity: 0; transform: translateY(8px); }

.page-loader-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(244, 243, 239, 0.85); backdrop-filter: blur(4px); }
.page-loader-spinner { width: 40px; height: 40px; border: 3px solid #e5e7eb; border-top-color: #111; border-radius: 50%; animation: page-loader-spin 0.7s linear infinite; }
@keyframes page-loader-spin { to { transform: rotate(360deg); } }

.mobile-nav { display: none; }
.mobile-only { display: none; }

@media (max-width: 1050px) {
  .sidebar { width: 220px; }
  .app-main { margin-left: 220px; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 780px) {
  body { padding-bottom: 72px; }
  .sidebar { display: none; }
  .app-main { margin-left: 0; }
  .topbar { height: 66px; padding: 0 18px; }
  .page-container { padding: 23px 16px 35px; }
  .page-header { align-items: flex-start; flex-direction: column; margin-bottom: 21px; }
  .page-header .btn { width: 100%; }
  .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; }
  .mobile-nav { position: fixed; z-index: 50; inset: auto 0 0; height: 70px; padding: 7px 8px max(7px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5,1fr); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(15px); }
  .mobile-link { display: grid; place-items: center; align-content: center; gap: 3px; color: #898989; font-size: 9px; font-weight: 700; border-radius: 10px; }
  .mobile-link i { width: 19px; height: 19px; }
  .mobile-link.active { color: var(--violet); background: var(--violet-soft); }
  .desktop-only { display: none !important; }
  .mobile-only { display: initial; }
  .toast { left: 15px; right: 15px; bottom: 84px; }
}

.sidebar { transition: width .25s ease, padding .25s ease; }
.app-main { transition: margin-left .25s ease, margin-right .25s ease; }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 22px; }
.sidebar-brand { display: flex; align-items: center; height: 32px; padding: 0 8px 0 !important; }
.sidebar-toggle { width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: 9px; background: rgba(244,243,239,.12); color: #F4F3EF; cursor: pointer; transition: background .2s, transform .25s ease; }
.sidebar-toggle:hover { background: rgba(244,243,239,.22); }
.sidebar.collapsed .sidebar-toggle { transform: scaleX(-1); }
.sidebar.collapsed { width: 72px; padding: 18px 10px; }
.sidebar.collapsed .sidebar-header { flex-direction: column; align-items: center; gap: 10px; }
.sidebar.collapsed .brand-logo-image { width: 44px; }
.sidebar.collapsed .side-link { justify-content: center; padding: 0; min-height: 44px; }
.sidebar.collapsed .side-link i { margin: 0; }
.app-main.collapsed { margin-left: 72px; }
.app-main.assistant-open { margin-right: 380px; }
