:root{
  --app-bg:#f6f7fb;
  --card-radius:16px;
}
html, body{
  height: 100%;
  overflow-x: hidden;
}

body{ background:var(--app-bg); }
.app-shell{ max-width: 520px; margin:0 auto; min-height:100vh; padding-bottom: 24px; }
.app-navbar{ position: sticky; top:0; z-index:1030; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom:1px solid #eee; }
.app-card{ border:0; border-radius: var(--card-radius); box-shadow: 0 8px 22px rgba(10,20,30,0.06); }
.pill{ border-radius:999px; }
.muted{ color:#6c757d; }
.app-logo{ width:40px; height:40px; background:#0d6efd10; }
.party-item{ border:1px solid #edf0f5; border-radius:14px; background:#fff; }
.party-item:hover{ border-color:#dfe6f1; }
.party-avatar{ width:44px; height:44px; border-radius:12px; background:#e9f2ff; display:flex; align-items:center; justify-content:center; font-weight:700; color:#0d6efd; }
.ledger-row{ border:1px solid #edf0f5; border-radius:14px; background:#fff; }
.ledger-tag{ font-size:.75rem; padding:.2rem .55rem; border-radius:999px; }

/* ✅ Space so content never hides behind bottom nav (mobile safe-area included) */
.app-shell{
  padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
}

/* ✅ Bottom nav always fixed on screen */
.app-bottom-nav{
  position: fixed !important;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;

  background: rgba(255,255,255,.96);
  border-top: 1px solid #e9ecef;
  padding: 10px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;

  z-index: 9999;         /* ✅ always above content */
  backdrop-filter: blur(8px);
}

/* 3 items equal */
.app-bottom-nav-3 .nav-item{ flex: 1; }

.app-bottom-nav .nav-item{
  text-align: center;
  color: #6c757d;
  text-decoration: none;
  font-size: 12px;
  line-height: 1.1;
  padding: 8px 0;
  border-radius: 12px;
}

.app-bottom-nav .nav-item i{
  font-size: 20px;
  display: block;
  margin-bottom: 2px;
}

.app-bottom-nav .nav-item.active{
  color: #0d6efd;
  background: #0d6efd10;
  font-weight: 600;
}

/* ✅ Desktop look */
@media (min-width: 992px){
  .app-bottom-nav{
    bottom: 14px;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    box-shadow: 0 10px 26px rgba(0,0,0,.08);
    padding-bottom: 8px; /* no safe-area needed on desktop */
  }
}

/* ✅ App title/subtitle stay in one line */
.app-title,
.app-subtitle{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;   /* mobile me cut ho to ellipsis */
}

@media (min-width: 992px){
  .app-title,.app-subtitle{ max-width: 520px; } /* desktop pe full */
}

/* ✅ Right icons always in ONE row */
.header-actions{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

/* ✅ Mobile: if icons zyada hon, cut nahi honge — swipe horizontally */
@media (max-width: 576px){
  .header-actions{
    max-width: 52vw;         /* left text ko space milay */
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .header-actions::-webkit-scrollbar{ height: 0; } /* clean look */
}

/* ✅ make icon buttons a bit smaller on mobile */
@media (max-width: 576px){
  .btn.pill{
    padding: 6px 10px;
  }
  .btn.pill i{
    font-size: 18px;
  }
}

