:root {
      --navy: #062c59;
      --navy2: #073b75;
      --blue: #087cf0;
      --bg: #f2f7ff;
      --ink: #102e59;
      --muted: #6680a6;
      --line: #e4edf8;
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      font-family: Inter, "Segoe UI", Arial, sans-serif;
      color: var(--ink);
      background: var(--bg);
    }

    button {
      font: inherit;
      cursor: pointer;
    }

    .app {
      min-height: 100vh;
      display: grid;
      grid-template-columns: 246px minmax(0, 1fr);
    }

    /* SIDEBAR */
    .sidebar {
      background: linear-gradient(180deg, #05264d, #06396e);
      color: white;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      box-shadow: 5px 0 22px #143c6714;
    }

    .brand {
      height: 88px;
      padding: 16px 22px;
      display: flex;
      gap: 12px;
      align-items: center;
      border-bottom: 1px solid #ffffff1b;
    }

    .drop {
      font-size: 37px;
      color: #20a4ff;
      text-shadow: 0 0 15px #31baff;
    }

    .brand strong {
      font-size: 27px;
      letter-spacing: 1px;
      display: block;
    }

    .brand small {
      font-size: 10px;
      letter-spacing: 0.4px;
      color: #d6eaff;
    }

    .nav {
      padding: 14px 9px;
      flex: 1;
    }

    .group {
      margin: 10px 0 17px;
    }

    .group-label {
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 1.3px;
      color: #9cbce0;
      padding: 8px 12px;
    }

    .nav-item {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 10px 12px;
      margin: 3px 0;
      border-radius: 10px;
      color: #eaf4ff;
      font-size: 13px;
    }

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

    .nav-item.active {
      background: linear-gradient(90deg, #087cf0, #0865cf);
      box-shadow: 0 5px 14px #001d443d;
    }

    .profile {
      padding: 16px;
      border-top: 1px solid #ffffff24;
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 12px;
    }

    .avatar {
      background: #1686f8;
      border: 2px solid #8dc7ff;
      border-radius: 50%;
      width: 38px;
      height: 38px;
      display: grid;
      place-items: center;
      font-weight: 800;
    }

    /* TOP BAR */
    main {
      min-width: 0;
    }

    .topbar {
      height: 56px;
      background: #ffffffed;
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      padding: 0 24px;
      gap: 18px;
      position: sticky;
      top: 0;
      z-index: 5;
    }

    .hamb {
      font-size: 23px;
      color: #174777;
    }

    .search {
      height: 38px;
      border: 1px solid #d9e7f7;
      border-radius: 13px;
      background: #f9fbff;
      display: flex;
      align-items: center;
      padding: 0 14px;
      gap: 10px;
      max-width: 520px;
      flex: 1;
      color: #6d85a8;
      font-size: 13px;
      box-shadow: inset 0 1px 3px #173c6a0b;
    }

    .topright {
      margin-left: auto;
      display: flex;
      align-items: center;
      gap: 18px;
      font-size: 12px;
    }

    .pill {
      border: 1px solid #dfe9f6;
      border-radius: 12px;
      background: white;
      padding: 10px 13px;
      white-space: nowrap;
    }

    .content {
      padding: 0 18px 16px;
      max-width: 1800px;
      margin: auto;
    }

    /* PREMIUM HERO BANNER */
    .hero {
      height: 306px;
      margin: 0 -18px 16px;
      position: relative;
      overflow: hidden;
      background: #d8edff;
      border-bottom: 1px solid #cde4ff;
    }

    .hero img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
    }

    .hero:after {
      content: "";
      position: absolute;
      inset: 0;
      background: linear-gradient(
        90deg,
        #eaf6ff 0%,
        #eaf6ffdf 20%,
        #eaf6ff28 48%,
        transparent 100%
      );
    }

    .hero-copy {
      position: absolute;
      z-index: 1;
      left: 3.4%;
      top: 24px;
      max-width: 390px;
    }

    .eyebrow {
      font-size: 11px;
      letter-spacing: 2px;
      font-weight: 900;
      color: #087cf0;
    }

    .hero h1 {
      font-size: clamp(35px, 4vw, 60px);
      line-height: 0.97;
      margin: 8px 0;
      color: #062d62;
      letter-spacing: -1.5px;
    }

    .hero h2 {
      font-size: 22px;
      letter-spacing: 3px;
      margin: 8px 0;
      color: #0b3f7e;
    }

    .hero p {
      font-size: 13px;
      line-height: 1.6;
      max-width: 330px;
      color: #244f7d;
    }

    .primary {
      border: 0;
      border-radius: 11px;
      background: linear-gradient(135deg, #168cff, #0062d5);
      color: white;
      padding: 11px 17px;
      font-size: 13px;
      font-weight: 700;
      box-shadow: 0 7px 18px #087cf044;
    }

    .hero-badges {
      position: absolute;
      z-index: 2;
      right: 2%;
      top: 24px;
      display: grid;
      gap: 9px;
      width: 205px;
    }

    .badge {
      background: #ffffffd9;
      backdrop-filter: blur(8px);
      border: 1px solid white;
      border-radius: 14px;
      padding: 11px 13px;
      font-size: 12px;
      font-weight: 650;
      box-shadow: 0 4px 14px #164e8314;
    }

    .badge span {
      font-size: 17px;
      margin-right: 8px;
    }

    /* SECTION HEADINGS */
    .section-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 16px;
      font-weight: 800;
      margin: 14px 2px 10px;
    }

    .subtle {
      font-size: 11px;
      font-weight: 400;
      color: var(--muted);
    }

    /* BUSINESS SUMMARY CARDS */
    .stats {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 12px;
    }

    .stat {
      background: white;
      border: 1px solid #e4edf8;
      border-radius: 16px;
      min-height: 96px;
      padding: 16px;
      display: flex;
      align-items: center;
      gap: 13px;
      box-shadow: 0 5px 18px #174c8010;
      position: relative;
      overflow: hidden;
    }

    .stat:after {
      content: "";
      position: absolute;
      right: 12px;
      bottom: 10px;
      width: 65px;
      height: 48px;
      opacity: 0.12;
      background: repeating-linear-gradient(
        90deg,
        #0787ff 0 7px,
        transparent 7px 12px
      );
      clip-path: polygon(
        0 80%, 15% 60%, 30% 68%, 45% 30%,
        60% 45%, 75% 10%, 90% 22%, 100% 0,
        100% 100%, 0 100%
      );
    }

    .stat-icon {
      height: 48px;
      width: 48px;
      border-radius: 13px;
      display: grid;
      place-items: center;
      font-size: 22px;
      flex-shrink: 0;
    }

    .blue {
      background: #e4f1ff;
      color: #087cf0;
    }

    .green {
      background: #e0faef;
      color: #09a66b;
    }

    .orange {
      background: #fff0d8;
      color: #f59b18;
    }

    .purple {
      background: #eee6ff;
      color: #7446e8;
    }

    .stat label {
      font-size: 12px;
      color: #5c769b;
      display: block;
    }

    .stat strong {
      font-size: 25px;
      display: block;
      margin: 3px 0;
      letter-spacing: -0.5px;
    }

    .trend {
      font-size: 11px;
      color: #128a49;
    }

    /* DASHBOARD PANELS */
    .grid-main {
      display: grid;
      grid-template-columns: 1.4fr 1fr 0.92fr;
      gap: 12px;
      margin-top: 12px;
    }

    .panel {
      background: white;
      border: 1px solid #e4edf8;
      border-radius: 16px;
      padding: 15px;
      box-shadow: 0 5px 18px #174c800b;
      min-width: 0;
    }

    .panel-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 12px;
    }

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

    .select {
      font-size: 11px;
      color: #21476e;
      border: 1px solid #dce7f5;
      border-radius: 9px;
      padding: 7px;
      background: white;
    }

    /* SALES BAR CHART */
    .chart {
      height: 170px;
      display: flex;
      align-items: flex-end;
      justify-content: space-around;
      border-bottom: 1px solid #dbe6f4;
      padding: 12px 4px 0;
      background: repeating-linear-gradient(
        to bottom,
        transparent 0 38px,
        #eaf1f9 39px 40px
      );
    }

    .day {
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      flex-direction: column;
      gap: 7px;
      font-size: 10px;
      color: #617da0;
    }

    .bars {
      height: 140px;
      display: flex;
      align-items: flex-end;
      gap: 4px;
    }

    .bar {
      width: 17px;
      border-radius: 4px 4px 0 0;
      background: linear-gradient(#168cff, #0870e8);
    }

    .bar.alt {
      background: linear-gradient(#32c984, #0eaa6d);
    }

    .legend {
      display: flex;
      justify-content: center;
      gap: 14px;
      font-size: 10px;
      color: #587395;
      margin-top: 8px;
    }

    .dot {
      display: inline-block;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      margin-right: 5px;
      background: #087cf0;
    }

    .dot.green-dot {
      background: #19b775;
    }

    /* BOTTLE SALES DONUT CHART */
    .donut-wrap {
      display: flex;
      align-items: center;
      gap: 18px;
      justify-content: center;
      min-height: 178px;
    }

    .donut {
      width: 150px;
      height: 150px;
      border-radius: 50%;
      background: conic-gradient(
        #087cf0 0 51%,
        #7b4df4 51% 71%,
        #20c3c1 71% 86%,
        #ffae3d 86% 94%,
        #ff6680 94% 100%
      );
      display: grid;
      place-items: center;
      flex-shrink: 0;
    }

    .donut:before {
      content: "";
      background: white;
      width: 88px;
      height: 88px;
      border-radius: 50%;
      grid-area: 1 / 1;
    }

    .donut-center {
      grid-area: 1 / 1;
      z-index: 1;
      text-align: center;
      font-size: 11px;
    }

    .donut-center strong {
      display: block;
      font-size: 21px;
    }

    .legend-list {
      font-size: 11px;
      line-height: 2.25;
      min-width: 100px;
    }

    .legend-list b {
      float: right;
      margin-left: 10px;
    }

    /* RECENT ACTIVITY */
    .activity {
      display: grid;
      gap: 0;
    }

    .activity-row {
      display: flex;
      align-items: center;
      gap: 9px;
      padding: 8px 0;
      border-bottom: 1px solid #edf2f8;
      font-size: 11px;
    }

    .activity-row:last-child {
      border-bottom: 0;
    }

    .activity-icon {
      width: 33px;
      height: 33px;
      border-radius: 11px;
      background: #e5f2ff;
      display: grid;
      place-items: center;
      font-size: 16px;
      flex-shrink: 0;
    }

    .activity-row strong {
      display: block;
      font-size: 11px;
    }

    .activity-row small {
      color: #6a83a5;
    }

    .when {
      margin-left: auto;
      color: #7189a7;
      font-size: 10px;
      white-space: nowrap;
    }

    /* QUICK ACTIONS, STOCK & DELIVERIES */
    .grid-bottom {
      display: grid;
      grid-template-columns: 1.15fr 1fr 1.05fr;
      gap: 12px;
      margin-top: 12px;
    }

    .quick-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 8px;
    }

    .quick {
      border: 1px solid #e1ecf8;
      border-radius: 12px;
      min-height: 70px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      gap: 5px;
      font-weight: 700;
      font-size: 11px;
      background: linear-gradient(145deg, #f3f8ff, #e6f2ff);
      color: #0871df;
    }

    .quick:nth-child(2) {
      background: #e9fbf1;
      color: #07874f;
    }

    .quick:nth-child(3) {
      background: #fff5e7;
      color: #e8790b;
    }

    .quick:nth-child(4) {
      background: #f1eaff;
      color: #6d38dc;
    }

    .quick:nth-child(5) {
      background: #fff0f0;
      color: #e53948;
    }

    .quick:nth-child(6) {
      background: #e8f9ff;
      color: #0789ad;
    }

    .quick span {
      font-size: 22px;
    }

    .stock-row,
    .delivery-row {
      display: flex;
      align-items: center;
      gap: 9px;
      padding: 7px 0;
      border-bottom: 1px solid #edf2f8;
      font-size: 11px;
    }

    .stock-row:last-child,
    .delivery-row:last-child {
      border: 0;
    }

    .product-icon {
      width: 30px;
      height: 30px;
      background: #e6f3ff;
      border-radius: 10px;
      display: grid;
      place-items: center;
      font-size: 17px;
    }

    .row-main {
      flex: 1;
      min-width: 0;
    }

    .row-main strong {
      display: block;
      font-size: 11px;
    }

    .row-main small {
      color: #7086a3;
    }

    .meter {
      height: 7px;
      width: 70px;
      background: #e8eef7;
      border-radius: 10px;
      overflow: hidden;
    }

    .meter i {
      display: block;
      height: 100%;
      border-radius: 10px;
      background: #ff555d;
    }

    .status {
      border-radius: 20px;
      padding: 6px 9px;
      font-size: 10px;
      background: #ffe8eb;
      color: #d82b3b;
    }

    .status.med {
      background: #fff0d8;
      color: #b76800;
    }

    .status.good {
      background: #ddf8eb;
      color: #087b4a;
    }

    .truck {
      width: 43px;
      height: 32px;
      background: #e3f2ff;
      border-radius: 9px;
      display: grid;
      place-items: center;
      font-size: 21px;
    }

    /* FOOTER */
    .footer {
      margin-top: 12px;
      background: #ffffffd9;
      border: 1px solid #e5edf8;
      border-radius: 14px;
      padding: 12px;
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      text-align: center;
      font-size: 12px;
      font-weight: 750;
    }

    .footer small {
      display: block;
      color: #6d83a3;
      font-size: 10px;
      font-weight: 400;
      margin-top: 3px;
    }

    /* RESPONSIVE DESIGN */
    @media (max-width: 1200px) {
      .grid-main {
        grid-template-columns: 1.2fr 1fr;
      }

      .grid-main .activity-panel {
        grid-column: 1 / -1;
      }

      .grid-bottom {
        grid-template-columns: 1fr 1fr;
      }

      .grid-bottom .delivery-panel {
        grid-column: 1 / -1;
      }

      .hero-badges {
        display: none;
      }
    }

    @media (max-width: 850px) {
      .app {
        grid-template-columns: 76px minmax(0, 1fr);
      }

      .brand {
        padding: 12px;
        justify-content: center;
      }

      .brand div:last-child,
      .group-label,
      .nav-item .label,
      .profile .profile-text {
        display: none;
      }

      .nav-item {
        justify-content: center;
        padding: 12px 5px;
      }

      .nav-item .ico {
        font-size: 19px;
      }

      .profile {
        justify-content: center;
        padding: 12px 4px;
      }

      .topbar {
        padding: 0 12px;
      }

      .topright .pill,
      .topright .owner-label {
        display: none;
      }

      .hero {
        height: 260px;
      }

      .hero-copy {
        left: 22px;
        top: 24px;
      }

      .hero h1 {
        font-size: 40px;
      }

      .hero h2 {
        font-size: 16px;
      }

      .hero p {
        max-width: 250px;
      }

      .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .grid-main,
      .grid-bottom {
        grid-template-columns: 1fr;
      }

      .grid-main .activity-panel,
      .grid-bottom .delivery-panel {
        grid-column: auto;
      }

      .content {
        padding: 0 10px 12px;
      }

      .hero {
        margin: 0 -10px 12px;
      }

      .footer {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
      }
    }

    @media (max-width: 520px) {
      .topbar {
        gap: 8px;
      }

      .search {
        font-size: 10px;
        padding: 0 8px;
      }

      .topright {
        gap: 7px;
      }

      .hero {
        height: 240px;
      }

      .hero-copy {
        left: 16px;
        top: 20px;
      }

      .hero h1 {
        font-size: 34px;
      }

      .hero h2 {
        font-size: 13px;
        letter-spacing: 2px;
      }

      .hero p {
        font-size: 11px;
        max-width: 215px;
      }

      .hero:after {
        background: linear-gradient(
          90deg,
          #eaf6ff 0%,
          #eaf6ffe8 50%,
          #eaf6ff33 100%
        );
      }

      .stats {
        gap: 7px;
      }

      .stat {
        padding: 10px;
        gap: 8px;
        min-height: 85px;
      }

      .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 17px;
      }

      .stat strong {
        font-size: 19px;
      }

      .stat label {
        font-size: 10px;
      }

      .grid-main,
      .grid-bottom {
        gap: 8px;
      }

      .panel {
        padding: 11px;
      }

      .donut {
        width: 120px;
        height: 120px;
      }

      .donut:before {
        width: 70px;
        height: 70px;
      }

      .donut-center strong {
        font-size: 17px;
      }

      .legend-list {
        font-size: 10px;
      }

      .meter {
        width: 45px;
      }

      .quick {
        min-height: 62px;
      }

      .footer {
        font-size: 11px;
      }
    }

body:not(.larven-authenticated) .app {
        visibility: hidden;
    }

    body:not(.larven-authenticated) {
        background: #06264b;
    }

/* =========================================================
   LARVEN BMS — MOBILE / TABLET RESPONSIVE LAYER
   Keep this block AFTER the original CSS.
   ========================================================= */

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.app,
main,
.content,
.panel,
.grid-main,
.grid-bottom,
.stats {
  min-width: 0;
}

img {
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
  max-width: 100%;
}

/* Tablet */
@media (max-width: 850px) {
  .app {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .sidebar {
    width: 68px;
    min-width: 0;
    overflow-x: hidden;
  }

  .brand {
    justify-content: center;
    padding: 10px 4px;
  }

  .brand > div,
  .group-label,
  .nav-item .label,
  .profile .profile-text {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 12px 4px;
    gap: 0;
  }

  .nav-item .ico {
    width: auto;
    font-size: 20px;
  }

  .profile {
    justify-content: center;
    padding: 12px 4px;
  }

  .topbar {
    gap: 10px;
    padding: 0 12px;
  }

  .search {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .topright {
    flex: 0 0 auto;
    gap: 8px;
  }

  .topright .pill,
  .topright .owner-label {
    display: none;
  }

  .hero {
    height: 260px;
  }

  .hero-copy {
    left: 20px;
    right: 14px;
    top: 22px;
    max-width: 58%;
  }

  .hero h1 {
    font-size: clamp(32px, 5vw, 40px);
  }

  .hero h2 {
    font-size: 14px;
    letter-spacing: 1.5px;
  }

  .hero p {
    max-width: 250px;
  }

  .hero-badges {
    display: none;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-main,
  .grid-bottom {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-main .activity-panel,
  .grid-bottom .delivery-panel {
    grid-column: auto;
  }

  .content {
    padding: 0 10px 14px;
  }

  .hero {
    margin: 0 -10px 12px;
  }

  .footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .panel {
    min-width: 0;
  }

  .chart {
    max-width: 100%;
    overflow: hidden;
  }
}

/* Phones */
@media (max-width: 520px) {
  .app {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .sidebar {
    width: 52px;
    min-height: 100vh;
  }

  .brand {
    height: 72px;
    padding: 8px 2px;
  }

  .drop {
    font-size: 28px;
  }

  .nav {
    padding: 8px 4px;
  }

  .group {
    margin: 6px 0 12px;
  }

  .nav-item {
    min-height: 42px;
    margin: 3px 0;
    padding: 9px 2px;
    border-radius: 9px;
  }

  .nav-item .ico {
    font-size: 19px;
  }

  .profile {
    padding: 8px 2px;
  }

  .avatar {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }

  .topbar {
    height: 56px;
    gap: 6px;
    padding: 0 7px;
  }

  .hamb {
    flex: 0 0 24px;
    padding: 0;
    font-size: 21px;
  }

  .search {
    flex: 1 1 auto;
    min-width: 0;
    height: 36px;
    padding: 0 7px;
    gap: 4px;
    font-size: 10px;
    border-radius: 10px;
  }

  .topright {
    gap: 5px;
    font-size: 10px;
  }

  .topright .pill,
  .topright .owner-label {
    display: none;
  }

  .topright .avatar {
    display: grid;
  }

  .content {
    width: 100%;
    padding: 0 8px 14px;
  }

  .hero {
    height: 255px;
    margin: 0 -8px 12px;
    overflow: hidden;
  }

  .hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 63% center;
  }

  .hero:after {
    background: linear-gradient(
      90deg,
      #eaf6ff 0%,
      #eaf6fff0 48%,
      #eaf6ff80 78%,
      #eaf6ff20 100%
    );
  }

  .hero-copy {
    left: 13px;
    right: 8px;
    top: 18px;
    max-width: 78%;
  }

  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.2px;
  }

  .hero h1 {
    font-size: clamp(29px, 8vw, 35px);
    line-height: 1.02;
    letter-spacing: -0.8px;
  }

  .hero h2 {
    font-size: 12px;
    letter-spacing: 1.2px;
  }

  .hero p {
    max-width: 220px;
    font-size: 11px;
    line-height: 1.45;
  }

  .primary {
    padding: 10px 12px;
    font-size: 11px;
  }

  .section-title {
    align-items: flex-start;
    gap: 8px;
    font-size: 15px;
  }

  .section-title .subtle {
    max-width: 58%;
    text-align: right;
    line-height: 1.35;
    font-size: 10px;
  }

  .stats {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .stat {
    min-height: 78px;
    padding: 12px;
    gap: 10px;
  }

  .stat-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
  }

  .stat label {
    font-size: 11px;
  }

  .stat strong {
    font-size: 21px;
  }

  .grid-main,
  .grid-bottom {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    margin-top: 9px;
  }

  .panel {
    padding: 11px;
    border-radius: 14px;
  }

  .panel-head {
    flex-wrap: wrap;
    gap: 8px;
  }

  .panel h3 {
    font-size: 13px;
  }

  .select,
  select {
    max-width: 100%;
    min-width: 0;
  }

  .chart {
    width: 100%;
    min-width: 0;
    overflow: hidden;
  }

  .bars {
    gap: 4px;
  }

  .bar {
    width: clamp(7px, 2.2vw, 12px);
  }

  .donut-wrap {
    gap: 10px;
    justify-content: space-around;
  }

  .donut {
    width: 108px;
    height: 108px;
    flex: 0 0 108px;
  }

  .donut:before {
    width: 66px;
    height: 66px;
  }

  .donut-center strong {
    font-size: 16px;
  }

  .legend-list {
    min-width: 0;
    font-size: 9px;
  }

  .legend-list b {
    margin-left: 4px;
  }

  .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick {
    min-width: 0;
    padding: 9px 5px;
    font-size: 11px;
  }

  .stock-row,
  .delivery-row,
  .activity-row {
    min-width: 0;
    gap: 7px;
  }

  .row-main {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .row-main strong {
    overflow-wrap: anywhere;
    font-size: 12px;
  }

  .meter {
    width: 32px;
    flex: 0 0 32px;
  }

  .status {
    padding: 5px 7px;
    font-size: 10px;
    white-space: nowrap;
  }

  .footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 6px;
    padding: 14px 8px;
    font-size: 10px;
  }

  /* Prevent fixed logout controls from covering mobile content. */
  #larven-logout-button,
  .logout-button,
  .logout-btn {
    right: 12px !important;
    bottom: 12px !important;
    z-index: 20;
  }
}

/* Very narrow phones */
@media (max-width: 360px) {
  .app {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .sidebar {
    width: 46px;
  }

  .topbar {
    gap: 4px;
    padding: 0 5px;
  }

  .hamb {
    flex-basis: 20px;
  }

  .search {
    font-size: 9px;
    padding: 0 5px;
  }

  .hero {
    height: 235px;
  }

  .hero-copy {
    max-width: 82%;
  }

  .hero h1 {
    font-size: 29px;
  }

  .donut-wrap {
    flex-direction: column;
  }

  .legend-list {
    width: 100%;
  }
}
