/* ==========================================================================
   VIREKA — /dashboard
   Figma: SECTION "Dashboard" > FRAME "Dashboard - Filled" (467:53973), 1440 x 1017
   ========================================================================== */

:root {
  --dash-bg: #f2f2f7;
  --muted: #84899d;
  --muted-2: #8d909e;
  --ink-soft: #303139;
  --line: #e6e8f0;
  --green: #529658;
  --rail: 292px;
  --side: 226px;
}

body.dash { background: var(--dash-bg); }

.shell {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr) var(--rail);
  grid-template-rows: auto 1fr;
  gap: 28px;
  align-items: start;
  padding: 0 26px 26px 0;
  min-height: 100vh;
}

/* ---------------- Sidebar ---------------- */
.side {
  grid-row: 1 / -1;
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--white);
  border-radius: 0 28px 28px 0;
  padding: 32px 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.side .brand { color: var(--ink); font-size: 18px; line-height: 24px; }
.side .brand__mark { width: 26px; height: 26px; }

.side__nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.side__link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14px;
  line-height: 19px;
  color: var(--muted);
  transition: background-color .15s ease, color .15s ease;
}
.side__link svg { width: 20px; height: 20px; flex: none; }
.side__link:hover { background: #f4f6fc; color: var(--blue-600); }
.side__link.is-active {
  background: linear-gradient(135deg, #165dd7 0%, #3f78ff 100%);
  color: var(--white);
  box-shadow: 0 10px 22px rgba(22, 93, 215, .28);
}

.side__help {
  margin-top: auto;
  position: relative;
  border-radius: 22px;
  padding: 104px 14px 16px;
  background: linear-gradient(160deg, #2f6ee0 0%, #3f78ff 55%, #6d9bff 100%);
  overflow: hidden;
  text-align: left;
}
.side__help img {
  position: absolute;
  top: 8px; left: 50%;
  transform: translateX(-50%);
  width: 104px;
}
.side__help-card {
  background: var(--white);
  border-radius: 16px;
  padding: 14px;
}
.side__help h3 { font-size: 18px; line-height: 24px; font-weight: 700; color: var(--blue-600); margin: 0 0 6px; }
.side__help p { font-size: 12px; line-height: 16px; color: var(--muted); margin: 0 0 12px; }
.side__help .btn { width: 100%; padding: 11px 14px; font-size: 14px; gap: 8px; }
.side__help .btn svg { width: 16px; height: 16px; }

/* ---------------- Top bar ---------------- */
.topbar {
  grid-column: 2 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 24px 0 4px;
}
.icon-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--white);
  border: 0;
  display: grid;
  place-items: center;
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(16, 24, 64, .06);
}
.icon-btn svg { width: 20px; height: 20px; }
.userchip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border-radius: var(--radius-pill);
  padding: 6px 6px 6px 20px;
  box-shadow: 0 2px 8px rgba(16, 24, 64, .06);
  font-weight: 700;
  font-size: 14px;
}
.userchip img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

/* ---------------- Main column ---------------- */
.main { grid-column: 2; display: grid; gap: 28px; }

/* Hero card */
.greet {
  position: relative;
  border-radius: 26px;
  background: linear-gradient(120deg, #1450c9 0%, #2f6ee0 45%, #4f8bff 100%);
  color: var(--white);
  overflow: hidden;
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  align-items: end;
  min-height: 450px;
  padding: 28px 32px 26px;
}
.greet__mark {
  position: absolute;
  right: -80px; top: -120px;
  width: 520px;
  opacity: .10;
  pointer-events: none;
}
.greet__vio {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  align-self: end;
  margin-bottom: -26px;
}
.greet__body { position: relative; z-index: 1; padding-bottom: 8px; }
.greet__hi { font-size: 27px; line-height: 37px; font-weight: 500; margin: 0; }
.greet__sub { font-size: 14px; line-height: 19px; color: #dddee4; margin: 8px 0 0; max-width: 260px; }

.stats { display: flex; gap: 16px; margin-top: 26px; }
.stat {
  flex: 1;
  border-radius: 16px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  padding: 14px 16px;
}
.stat__top { display: flex; align-items: center; gap: 10px; }
.stat__top svg { width: 22px; height: 22px; }
.stat__num { font-size: 27px; line-height: 37px; font-weight: 500; }
.stat__label { font-size: 10px; line-height: 14px; color: #dddee4; margin: 2px 0 0; }

.kinds { margin-top: 24px; }
.kinds h3 { font-size: 14px; line-height: 19px; font-weight: 500; margin: 0 0 10px; }
.kinds__row { display: flex; gap: 18px; }
.kind { text-align: center; min-width: 56px; }
.kind__icon {
  width: 42px; height: 42px;
  margin: 0 auto 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .2);
  display: grid;
  place-items: center;
}
.kind__icon svg { width: 20px; height: 20px; }
.kind__label { font-size: 10px; line-height: 14px; display: block; }
.kind__num { font-size: 20px; line-height: 27px; font-weight: 500; }

.greet__cta {
  position: absolute;
  left: 32px;
  bottom: 26px;
  background: var(--white);
  color: var(--blue-600);
  font-weight: 700;
  font-size: 14px;
  padding: 15px 30px;
  z-index: 2;
}

/* Recent works */
.panel {
  background: var(--white);
  border-radius: 26px;
  padding: 24px;
}
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.panel__head h2 { font-size: 16px; line-height: 22px; font-weight: 500; margin: 0; }
.panel__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--blue-600);
}
.panel__link svg { width: 14px; height: 14px; }

.works { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.work {
  position: relative;
  border: 1px solid #dbe4fb;
  border-radius: 18px;
  padding: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #f7f9ff 100%);
}
.work__mark {
  position: absolute;
  right: -30px; top: -20px;
  width: 150px;
  opacity: .06;
  pointer-events: none;
}
.work__head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.work__avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2f6ee0, #5b93ff);
  display: grid;
  place-items: center;
  color: var(--white);
  flex: none;
}
.work__avatar svg { width: 22px; height: 22px; }
.work__title { font-size: 18px; line-height: 24px; font-weight: 700; margin: 0; }

.work__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.work__key { font-size: 12px; line-height: 16px; color: var(--muted); text-transform: uppercase; }
.work__val { font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.work__val svg { width: 22px; height: 22px; color: var(--blue-500); }
.chip-ok {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e7f4e8;
  color: var(--green);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
}
.chip-ok svg { width: 14px; height: 14px; }

.meter { margin: 16px 0 14px; }
.meter__val { font-family: var(--font-ui); font-weight: 700; font-size: 16px; color: var(--blue-600); }
.meter__track { height: 6px; border-radius: 3px; background: #e3e8f6; margin-top: 6px; overflow: hidden; }
.meter__fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, #1450c9, #4f8bff); }

.work__next { font-size: 14px; font-weight: 700; margin: 0 0 2px; }
.work__hint { font-size: 12px; line-height: 20px; color: var(--muted-2); margin: 0 0 16px; }
.work .btn { width: 100%; padding: 13px; font-family: var(--font-display); font-weight: 700; font-size: 14px; }

/* ---------------- Right rail ---------------- */
.rail { grid-column: 3; display: grid; gap: 22px; }

.card-blue {
  border-radius: 22px;
  background: linear-gradient(140deg, #1450c9 0%, #2f6ee0 60%, #4f8bff 100%);
  color: var(--white);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.card-blue h2 { font-size: 16px; line-height: 22px; font-weight: 500; margin: 0 0 16px; }

.quick { display: flex; gap: 12px; }
.quick .btn { flex: 1; padding: 11px 10px; font-size: 12px; font-weight: 500; gap: 7px; border-radius: var(--radius-pill); }
.quick .btn svg { width: 14px; height: 14px; }
.quick__primary { background: var(--white); color: var(--blue-600); }
.quick__ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }

/* Activity feed — blue header, white body */
.feed { padding-bottom: 8px; }
.feed__list {
  list-style: none;
  margin: 0;
  padding: 8px;
  background: var(--white);
  border-radius: 16px;
  display: grid;
  gap: 2px;
  max-height: 330px;
  overflow-y: auto;
}
.feed__item { display: flex; gap: 12px; padding: 10px; border-radius: 12px; }
.feed__item:hover { background: #f6f8fe; }
.feed__icon {
  width: 26px; height: 26px;
  flex: none;
  border-radius: 50%;
  background: #e9f0ff;
  color: var(--blue-600);
  display: grid;
  place-items: center;
}
.feed__icon svg { width: 15px; height: 15px; }
.feed__text { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--ink-soft); margin: 0; }
.feed__time { font-size: 10px; line-height: 14px; color: var(--muted); margin: 6px 0 0; }

.insight { display: flex; gap: 12px; padding: 14px 0; }
.insight + .insight { border-top: 1px solid rgba(255, 255, 255, .18); }
.insight__icon {
  width: 30px; height: 30px;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  display: grid;
  place-items: center;
}
.insight__icon svg { width: 16px; height: 16px; }
.insight h3 { font-size: 14px; line-height: 19px; font-weight: 700; margin: 0 0 4px; }
.insight p { font-size: 12px; line-height: 20px; color: #d3d5dc; margin: 0; }
.card-blue__divider { border-top: 1px solid rgba(255,255,255,.18); margin: 4px 0 0; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1280px) {
  .shell { grid-template-columns: var(--side) minmax(0, 1fr); }
  .rail { grid-column: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { grid-column: 2; }
}
@media (max-width: 1000px) {
  .greet { grid-template-columns: 1fr; min-height: 0; padding-bottom: 96px; }
  .greet__vio { max-width: 260px; margin-bottom: 0; }
  .greet__cta { left: 32px; right: 32px; bottom: 24px; justify-content: center; }
  .works { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    padding: 0 16px 16px;
  }
  .side {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 40;
    width: var(--side);
    transform: translateX(-100%);
    transition: transform .25s ease;
  }
  .shell--nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(6,5,11,.4); }
  .topbar, .main, .rail { grid-column: 1; }
  .topbar { justify-content: space-between; }
  .rail { grid-template-columns: 1fr; }
  .side__toggle { display: inline-grid; }
}

.side__toggle { display: none; }
