/* NAYAD responsive app shell.
   The phone UI intentionally remains owned by the existing base styles.
   Every rule in this file starts at 600px. */

@media (min-width: 600px) {
  #app.app {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 72px 0 0 104px;
    background: var(--bg);
    box-shadow: none;
  }

  #app > header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 12;
    width: auto;
    height: 72px;
    padding: 0 20px;
  }

  #app > header .logo {
    font-size: 21px;
  }

  #app > main {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 20px 32px;
  }

  #app > .bottom {
    position: fixed;
    inset: 72px auto 0 0;
    z-index: 11;
    width: 104px;
    max-width: none;
    height: auto;
    padding: 15px 8px;
    transform: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
    background: rgba(255, 255, 255, .96);
    border-top: 0;
    border-right: 1px solid var(--line);
  }

  #app > .bottom .nav {
    width: 100%;
    min-height: 72px;
    flex: 0 0 72px;
    padding: 8px 5px;
    border-radius: 15px;
    font-size: 10px;
    gap: 5px;
  }

  #app > .bottom .navIcon {
    width: 25px;
    height: 25px;
  }

  #app .homeTop {
    gap: 7px;
    margin-bottom: 13px;
  }

  #app .homeGreeting {
    font-size: 18px;
  }

  #app .homeStoreRow {
    align-items: center;
  }

  #app .homeActiveStore {
    max-width: calc(100% - 54px);
    padding: 6px 10px;
    font-size: 10px;
  }

  #app .homeInvoiceAdd {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  #app .homeStats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
    margin: 0 0 13px;
  }

  #app .homeStats .stat {
    min-height: 92px;
    padding: 11px 12px;
    border-radius: 16px;
  }

  #app .homeStats .stat small {
    min-height: 18px;
    font-size: 10px;
  }

  #app .homeStats .stat b {
    margin-top: 5px;
    font-size: clamp(17px, 2.1vw, 23px);
  }

  #app .homeUrgentHead {
    min-height: 36px;
    margin-top: 10px;
    margin-bottom: 7px;
  }

  #app .homeQuickFilter {
    width: 31px;
    height: 31px;
  }

  #app #homeUrgentDebtList {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
  }

  #app #homeUrgentDebtList > .homeDebtCard {
    margin: 0;
    padding: 8px 12px;
    min-height: 54px;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
  }

  #app #homeUrgentDebtList > .homeDebtCard:last-child {
    border-bottom: 0;
  }

  #app #homeUrgentDebtList > .homeUrgentEmpty {
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  #app #homeUrgentDebtList .contactAvatar {
    width: 34px;
    height: 34px;
  }

  #app #homeUrgentDebtList .contactAvatar svg {
    width: 19px;
    height: 19px;
  }

  #app #homeUrgentDebtList .company b {
    font-size: 13px;
  }

  #app #homeUrgentDebtList .company span {
    margin-top: 2px;
    font-size: 9px;
  }

  #app #homeUrgentDebtList .amount {
    font-size: 13px;
  }

  #app .contactListRow {
    min-height: 54px;
    padding: 7px 10px;
  }

  #app .contactAddButton {
    max-width: 360px;
  }

  #app .paySummaryGrid,
  #app .loanSummaryGrid {
    gap: 11px;
    margin: 16px 0 20px;
  }

  #app .paySummary,
  #app .loanSummary {
    min-height: 96px;
    padding: 11px 12px;
    border-radius: 16px;
  }

  #app .dueList,
  #app .loanList {
    gap: 7px;
  }

  #app .dueRow {
    min-height: 66px;
    padding: 9px 12px;
    border-radius: 14px;
  }

  #app .loanCard {
    padding: 11px 12px;
    border-radius: 15px;
  }

  #profileMenuRoot .profileMenuDrawer {
    right: 0;
  }

  html.nightMode #app > .bottom {
    background: rgba(25, 25, 23, .97);
    border-right-color: var(--line);
  }
}

@media (min-width: 1024px) {
  #app.app {
    padding-top: 74px;
    padding-left: 174px;
  }

  #app > header {
    height: 74px;
    padding: 0 24px;
  }

  #app > header .logo {
    width: 126px;
    font-size: 22px;
  }

  #app > main {
    max-width: 1480px;
    padding: 20px 28px 34px;
  }

  #app > .bottom {
    top: 74px;
    width: 174px;
    padding: 17px 12px;
    gap: 6px;
  }

  #app > .bottom .nav {
    min-height: 52px;
    flex-basis: 52px;
    padding: 8px 12px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 11px;
    border-radius: 13px;
    font-size: 12px;
  }

  #app > .bottom .navIcon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
  }

  #app .homeTop {
    position: relative;
    min-height: 43px;
    padding-right: 54px;
    margin-bottom: 10px;
  }

  #app .homeGreeting {
    font-size: 18px;
  }

  #app .homeStoreRow {
    width: auto;
    justify-content: flex-start;
  }

  #app .homeQuickActions {
    position: absolute;
    right: 0;
    top: 2px;
  }

  #app .homeInvoiceAdd {
    position: static;
  }

  #app .homeStats {
    gap: 13px;
  }

  #app .homeStats .stat {
    min-height: 82px;
    padding: 10px 14px;
  }

  #app .homeStats .statIcon {
    width: 18px;
    height: 18px;
    margin-bottom: 4px;
  }

  #app .homeStats .stat small {
    min-height: 14px;
    font-size: 9px;
  }

  #app .homeStats .stat b {
    font-size: clamp(18px, 1.7vw, 25px);
  }

  #app .homeUrgentHead {
    min-height: 34px;
    margin-top: 7px;
    margin-bottom: 6px;
  }

  #app #homeUrgentDebtList > .homeDebtCard {
    min-height: 48px;
    padding: 6px 12px;
  }

  #app #homeUrgentDebtList .contactAvatar {
    width: 31px;
    height: 31px;
  }

  #app #homeUrgentDebtList .company {
    gap: 9px;
  }

  #app #homeUrgentDebtList .company b,
  #app #homeUrgentDebtList .amount {
    font-size: 12px;
  }

  #app #homeUrgentDebtList .homeDebtDue {
    font-size: 8px;
  }

  #app .contactList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #app .contactListEmpty {
    grid-column: 1 / -1;
  }

  #app .contactSearchRow {
    max-width: 720px;
  }

  #app .loanList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  #app .loanList > .emptyPay,
  #app .loanList > .card {
    grid-column: 1 / -1;
  }

  #app .reportGroup .dueList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #app .modal .sheet,
  #app + .modal .sheet {
    scrollbar-width: thin;
  }
}

@media (min-width: 1440px) {
  #app.app {
    padding-left: 188px;
  }

  #app > .bottom {
    width: 188px;
  }

  #app > main {
    padding-right: 36px;
    padding-left: 36px;
  }
}
