:root {
  --bg: #f3f8f3;
  --card: #fffef8;
  --card-soft: #f8fbf7;

  --text: #26443a;
  --muted: #6f8279;
  --border: #dce9df;

  --primary: #72b59a;
  --primary-dark: #4e9277;
  --primary-soft: #e5f3ea;

  --blue: #76b7d3;
  --blue-dark: #4d94b5;
  --blue-soft: #e7f4f8;

  --yellow: #f3d66b;
  --yellow-soft: #fff7d6;

  --green: #5eaa82;
  --green-soft: #e8f6ed;

  --red: #d97878;
  --red-soft: #fcecec;

  --orange: #d89a5b;
  --orange-soft: #fff1de;

  --shadow: 0 8px 24px rgba(58, 92, 76, 0.08);
  --shadow-hover: 0 12px 28px rgba(58, 92, 76, 0.13);

  --radius: 20px;
  --radius-small: 14px;
  --nav-height: 76px;

  /* =====================================================
     OweMe UI SYSTEM
     Keep common spacing and control sizing consistent.
     ===================================================== */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;

  --control-sm: 36px;
  --control-md: 42px;

  --text-body: 15px;
  --text-secondary: 13px;
  --text-label: 13px;
  --text-section: 18px;
  --text-page: 24px;

  --control-radius: 12px;
}

/* =========================
   GLOBAL
========================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 8%, rgba(243, 214, 107, 0.18), transparent 24%),
    radial-gradient(circle at 92% 18%, rgba(118, 183, 211, 0.14), transparent 25%),
    var(--bg);
  color: var(--text);
  font-family:
    "Nunito",
    "Trebuchet MS",
    "Segoe UI",
    Arial,
    sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--primary-dark);
}

.hidden {
  display: none !important;
}

/* =========================
   AUTH
========================= */

.screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 430px;
  padding: 34px 30px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "✦";
  position: absolute;
  top: 12px;
  right: 20px;
  color: var(--yellow);
  font-size: 28px;
  transform: rotate(12deg);
}

.auth-card::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--blue-soft);
  right: -45px;
  bottom: -45px;
}

.brand {
  text-align: center;
  margin-bottom: 28px;
}

.brand-icon {
  width: 66px;
  height: 66px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  border: 3px solid #cce5d6;
  border-radius: 22px;
  font-size: 30px;
  transform: rotate(-3deg);
  box-shadow: 4px 5px 0 rgba(114, 181, 154, 0.15);
}

.brand h1,
.brand h2 {
  margin: 0;
  color: var(--text);
  font-weight: 900;
  letter-spacing: -0.5px;
}

.brand p {
  margin: 6px 0 0;
  color: var(--muted);
}

/* =========================
   FORMS
========================= */

.form-group {
  margin-bottom: 17px;
}

.form-group label {
  display: block;
  margin-bottom: 7px;
  color: var(--text);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  color: var(--text);
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: var(--radius-small);
  outline: none;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

input::placeholder,
textarea::placeholder {
  color: #9aaba3;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.username-input {
  position: relative;
}

.username-input input {
  padding-left: 34px;
}

.username-input::before {
  content: "@";
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-weight: 900;
  z-index: 1;
}

/* =========================
   BUTTONS
========================= */

button,
.button {
  border: 0;
  border-radius: 14px;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease;
}

button:hover,
.button:hover {
  transform: translateY(-1px);
}

button:active,
.button:active {
  transform: translateY(1px);
}

.primary-button,
button.primary-button {
  width: 100%;
  padding: 13px 18px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 900;
  box-shadow: 0 5px 0 var(--primary-dark);
}

.primary-button:hover,
button.primary-button:hover {
  background: #68ad91;
  box-shadow: 0 6px 0 var(--primary-dark);
}

.secondary-button,
button.secondary-button {
  padding: 11px 16px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-weight: 800;
}

.danger-button,
button.danger-button {
  padding: 11px 16px;
  background: var(--red-soft);
  color: var(--red);
  font-weight: 800;
}

.success-button,
button.success-button {
  padding: 11px 16px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 800;
}

.small-button {
  padding: 8px 12px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 11px;
  font-size: 13px;
  font-weight: 900;
}

.green-button {
  background: var(--green-soft);
  color: var(--green);
}

.red-button {
  background: var(--red-soft);
  color: var(--red);
}

.button-row,
.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================
   APP TOPBAR
========================= */

.app {
  min-height: 100vh;
  padding-bottom: calc(var(--nav-height) + 24px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 15px 20px;
  background: rgba(255, 254, 248, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar h1,
.topbar h2,
.page-title {
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.topbar h1::after,
.page-title::after {
  content: " ✦";
  color: var(--yellow);
  font-size: 0.65em;
}

/* =========================
   MAIN CONTENT
========================= */

.content {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* =========================
   BOTTOM NAV
========================= */

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 4px;
  z-index: 50;
  width: min(calc(100% - 24px), 720px);
  height: var(--nav-height);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 10px;
  background: rgba(255, 254, 248, 0.96);
  border: 1px solid var(--border);
  border-radius: 25px;
  box-shadow: 0 10px 30px rgba(50, 84, 67, 0.16);
  backdrop-filter: blur(14px);
}

.bottom-nav button {
  min-width: 68px;
  padding: 8px 10px;
  background: transparent;
  color: var(--muted);
  border-radius: 15px;
  font-size: 12px;
  font-weight: 800;
}

.bottom-nav button:hover,
.bottom-nav button.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

/* =========================
   WELCOME / HOME
========================= */

.welcome {
  position: relative;
  padding: 26px;
  margin-bottom: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.welcome::before {
  content: "☁";
  position: absolute;
  right: 25px;
  top: 10px;
  color: var(--blue);
  font-size: 34px;
  opacity: 0.65;
}

.welcome::after {
  content: "⌁";
  position: absolute;
  right: 72px;
  bottom: 10px;
  color: var(--green);
  font-size: 34px;
  transform: rotate(-10deg);
}

.welcome h1,
.welcome h2,
.welcome h3 {
  margin-top: 0;
  font-weight: 900;
}

.welcome p {
  color: var(--muted);
}

.balance-card {
  position: relative;
  padding: 25px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #e5f3ea, #e7f4f8);
  border: 1px solid #cfe5d9;
  border-radius: 25px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.balance-card::after {
  content: "✈";
  position: absolute;
  right: 22px;
  top: 16px;
  color: var(--blue-dark);
  font-size: 25px;
  transform: rotate(-8deg);
}

.balance-number {
  margin-top: 4px;
  font-size: clamp(30px, 6vw, 48px);
  line-height: 1.1;
  font-weight: 950;
  letter-spacing: -1px;
}

.balance-number.positive {
  color: var(--green);
}

.balance-number.negative {
  color: var(--red);
}

/* =========================
   CARDS
========================= */

.card,
.group-card,
.expense-card,
.summary-card,
.member-row,
.settlement-row,
.invitation-row {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: 20px;
  margin-bottom: 16px;
}

.group-card {
  position: relative;
  padding: 20px;
  margin-bottom: 15px;
  overflow: hidden;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.group-card::before {
  content: "⌁";
  position: absolute;
  top: 5px;
  right: 15px;
  color: var(--yellow);
  font-size: 30px;
  transform: rotate(-10deg);
}

.group-card:hover {
  transform: translateY(-3px) rotate(0.2deg);
  box-shadow: var(--shadow-hover);
}

.group-card h3,
.group-card h4 {
  margin: 0 0 5px;
  font-weight: 900;
}

.group-card p {
  margin: 0;
  color: var(--muted);
}

/* =========================
   GROUP
========================= */

.group-header {
  margin-bottom: 20px;
}

.group-header h1,
.group-header h2,
.group-header h3 {
  margin-bottom: 5px;
  font-weight: 950;
}

.group-header p {
  color: var(--muted);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}

.summary-card {
  position: relative;
  padding: 17px;
  overflow: hidden;
}

.summary-card::after {
  content: "✦";
  position: absolute;
  right: 10px;
  top: 7px;
  color: var(--yellow);
  opacity: 0.75;
}

.summary-card h3,
.summary-card h4 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-card .value {
  margin-top: 5px;
  font-size: 22px;
  font-weight: 950;
}

.action-button {
  min-height: 45px;
  padding: 10px 16px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 900;
}

.action-button:hover {
  background: #d9eee1;
}

.add-expense-button {
  width: 100%;
  min-height: 52px;
  margin-top: 12px;
  background: var(--yellow);
  color: #5c5130;
  font-weight: 950;
  box-shadow: 0 5px 0 #d6bb4f;
}

.add-expense-button:hover {
  background: #efd05b;
}

/* =========================
   SECTION TITLES
========================= */

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 12px;
}

.section-title h2,
.section-title h3 {
  margin: 0;
  font-weight: 950;
}

.section-title p {
  margin: 3px 0 0;
  color: var(--muted);
}

/* =========================
   EXPENSES
========================= */

.expense-card {
  padding: 17px;
  margin-bottom: 4px;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease;
}

.expense-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.expense-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.expense-payer {
  color: var(--primary-dark);
  font-weight: 900;
}

.expense-amount {
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
  white-space: nowrap;
}

.expense-description {
  margin-top: 5px;
  color: var(--text);
  font-weight: 750;
}

.expense-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

/* =========================
   MEMBERS / SETTLEMENTS
========================= */

.member-row,
.settlement-row,
.invitation-row {
  padding: 15px;
  margin-bottom: 10px;
}

.member-row,
.settlement-row,
.invitation-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-name {
  color: var(--text);
  font-weight: 900;
}

.user-handle {
  color: var(--muted);
  font-size: 13px;
}

.settlement-row {
  background: #fbfdf9;
}

.invitation-row {
  background: var(--yellow-soft);
  border-color: #eee0a5;
}

/* =========================
   EXPENSE FORM
========================= */

.amount-input {
  font-size: 26px;
  font-weight: 950;
  text-align: center;
  background: #fbfdf9;
}

.participant-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.participant-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.participant-option:hover {
  background: var(--primary-soft);
}

.participant-option input[type="checkbox"] {
  width: auto;
  accent-color: var(--primary-dark);
}

/* =========================
   MODALS
========================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(38, 68, 58, 0.38);
  backdrop-filter: blur(3px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 23px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 25px;
  box-shadow: 0 22px 55px rgba(38, 68, 58, 0.22);
}

.modal-card h2,
.modal-card h3 {
  margin-top: 0;
  font-weight: 950;
}

.modal-close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 50%;
  font-size: 18px;
  font-weight: 900;
}

/* =========================
   TOAST
========================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-height) + 25px);
  z-index: 200;
  max-width: min(90vw, 430px);
  padding: 13px 17px;
  transform: translateX(-50%);
  background: var(--text);
  color: #ffffff;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 15px;
  box-shadow: var(--shadow-hover);
  font-weight: 800;
}

/* =========================
   LOADING
========================= */

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 28px;
  color: var(--muted);
  font-weight: 800;
}

.loading::before {
  content: "✦";
  color: var(--yellow);
  animation: twinkle 1s infinite alternate;
}

@keyframes twinkle {
  from {
    transform: scale(0.8) rotate(0deg);
    opacity: 0.5;
  }

  to {
    transform: scale(1.15) rotate(15deg);
    opacity: 1;
  }
}

/* =========================
   YOUR BALANCES
========================= */

.balance-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.balance-section {
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.balance-section-title {
  margin-bottom: 4px;
  font-weight: 950;
}

.balance-section-amount {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

/* =========================
   TRANSACTIONS
========================= */

.transactions-wrapper {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.transactions-table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
}

.transactions-table th {
  padding: 13px 14px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 950;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.transactions-table td {
  padding: 14px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.transactions-table tr:hover td {
  background: #fbfdf9;
}

/* =========================
   TRANSACTION STATUS
========================= */

.status-pending,
.status-confirmed,
.status-rejected {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
}

.status-pending {
  background: var(--yellow-soft);
  color: #806d18;
}

.status-confirmed {
  background: var(--green-soft);
  color: var(--green);
}

.status-rejected {
  background: var(--red-soft);
  color: var(--red);
}

/* =========================
   TABLE ACTION
========================= */

.table-action {
  padding: 7px 10px;
  background: var(--blue-soft);
  color: var(--blue-dark);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
}

/* =========================
   PAYABLES / RECEIVABLES
========================= */

.balance-detail-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.balance-detail-row {
  padding: 15px;
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: 15px;
}

.balance-detail-row strong {
  font-weight: 950;
}

.balance-detail-row .amount {
  color: var(--primary-dark);
  font-weight: 950;
}

.balance-detail-row .muted {
  color: var(--muted);
  font-size: 13px;
}

/* =========================
   QR / PAYMENT DETAILS
========================= */

.payment-card,
.payment-detail-card {
  padding: 17px;
  margin-bottom: 4px;
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.payment-card img,
.payment-detail-card img {
  display: block;
  max-width: 220px;
  width: 100%;
  margin: 12px auto;
  border-radius: 14px;
  border: 1px solid var(--border);
}

/* =========================
   EMPTY STATES
========================= */

.empty-state {
  padding: 32px 20px;
  text-align: center;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.empty-state::before {
  content: "🌿";
  display: block;
  margin-bottom: 8px;
  font-size: 28px;
}

.empty-state h3,
.empty-state h4 {
  margin: 0 0 5px;
  color: var(--text);
}

/* =========================
   DECORATIVE TRAVELOGUE DETAILS
========================= */

.route-line {
  position: relative;
}

.route-line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: repeating-linear-gradient(
    to right,
    var(--blue) 0 7px,
    transparent 7px 14px
  );
  opacity: 0.35;
}

.travel-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  background: var(--yellow-soft);
  color: #806d18;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
}

.travel-tag.green {
  background: var(--green-soft);
  color: var(--green);
}

.travel-tag.blue {
  background: var(--blue-soft);
  color: var(--blue-dark);
}

/* =========================
   RESPONSIVE
========================= */

@media (min-width: 700px) {
  .content {
    padding: 32px 28px;
  }

  .summary-grid {
    gap: 16px;
  }

  .bottom-nav {
    bottom: 4px;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 14px;
  }

  .screen {
    padding: 15px;
  }

  .auth-card {
    padding: 27px 20px;
    border-radius: 23px;
  }

  .content {
    width: calc(100% - 28px);
    padding: 22px 0 30px;
  }

  .topbar {
    padding: 13px 14px;
  }

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

  .balance-sections {
    grid-template-columns: 1fr;
  }

  .summary-card {
    padding: 15px;
  }

  .welcome {
    padding: 23px 20px;
  }

  .balance-card {
    padding: 23px 20px;
  }

  .expense-top {
    flex-direction: column;
    gap: 5px;
  }

  .expense-amount {
    font-size: 17px;
  }

  .member-row,
  .settlement-row,
  .invitation-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .action-row {
    width: 100%;
  }

  .action-row > button {
    flex: 1;
  }

  .modal {
    align-items: flex-end;
    padding: 8px;
  }

  .modal-card {
    max-height: 92vh;
    border-radius: 25px 25px 18px 18px;
    padding: 20px 16px;
  }

  .bottom-nav {
    width: calc(100% - 28px);
    bottom: 4px;
    height: 68px;
    border-radius: 22px;
  }

  .bottom-nav button {
    min-width: 52px;
    padding: 7px 5px;
    font-size: 11px;
  }

  .toast {
    bottom: 88px;
  }
}

/* =========================
   MAIN PAGE CONTENT SPACING
========================= */

#content {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 28px 40px;
}

@media (max-width: 700px) {
  #content {
    width: calc(100% - 28px);
    margin: 0 auto;
    padding: 24px 0 34px;
  }
}

/* =========================
   FLAT 2D BUTTON STYLE
========================= */

button,
.button {
  box-shadow: none !important;
  transform: none;
}

button:hover,
.button:hover {
  transform: none;
}

button:active,
.button:active {
  transform: none;
}

.primary-button,
button.primary-button,
.add-expense-button {
  box-shadow: none !important;
}

.primary-button:hover,
button.primary-button:hover,
.add-expense-button:hover {
  box-shadow: none !important;
}

.action-button,
.small-button,
.secondary-button,
.success-button,
.danger-button,
.table-action {
  box-shadow: none !important;
}

/* =========================
   AUTH FORM — CLEANER SPACING
========================= */

.auth-card {
  width: calc(100% - 40px);
  max-width: 390px;
  padding: 36px 30px 34px;
}

.auth-card .brand {
  margin-bottom: 34px;
}

.auth-card .brand h1 {
  margin-bottom: 8px;
}

.auth-card .brand p {
  margin-top: 8px;
  line-height: 1.5;
}

.auth-card h2 {
  margin-top: 0;
  margin-bottom: 26px;
  line-height: 1.2;
}

.auth-card .form-group {
  margin-bottom: 22px;
}

.auth-card .form-group label {
  margin-bottom: 10px;
  line-height: 1.3;
}

.auth-card input,
.auth-card select,
.auth-card textarea {
  min-height: 52px;
}

.auth-card .primary-button,
.auth-card button.primary-button {
  margin-top: 4px;
  min-height: 52px;
}

.auth-card .button-row {
  margin-top: 10px;
}

.auth-card p {
  line-height: 1.6;
}

@media (max-width: 700px) {
  .auth-card {
    width: calc(100% - 44px);
    max-width: 380px;
    padding: 32px 26px 30px;
  }

  .auth-card .brand {
    margin-bottom: 30px;
  }

  .auth-card h2 {
    margin-bottom: 24px;
  }

  .auth-card .form-group {
    margin-bottom: 21px;
  }

  .auth-card .form-group label {
    margin-bottom: 9px;
  }

  .auth-card input,
  .auth-card select,
  .auth-card textarea {
    min-height: 50px;
  }
}

/* =========================
   PRETTY FILE UPLOAD BUTTON
========================= */

input[type="file"] {
  width: 100%;
  min-height: 52px;
  padding: 8px;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: 14px;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 10px 16px;
  border: 0;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-family: inherit;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.15s ease;
}

input[type="file"]::file-selector-button:hover {
  background: #d7eee1;
}

input[type="file"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

/* =========================
   EMPTY GROUP — COMPACT CTA
========================= */

#createGroupButton,
button[onclick*="createGroup"],
.create-group-button {
  width: auto !important;
  min-width: 180px;
  max-width: 220px;
  min-height: 46px;
  padding: 11px 22px;
  display: block;
  margin: 14px auto 0;
  border-radius: 13px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 900;
  box-shadow: none !important;
}

#createGroupButton:hover,
button[onclick*="createGroup"]:hover,
.create-group-button:hover {
  background: var(--primary-dark);
}

/* =========================
   COMPACT FORM / GROUP BUTTONS
========================= */

/* Create Group */
button[onclick*="createGroup"],
#createGroupButton,
.create-group-button {
  width: fit-content !important;
  min-width: 180px;
  max-width: 220px;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Save Changes */
button[onclick*="saveProfile"],
button[onclick*="updateProfile"],
.save-profile-button {
  width: fit-content !important;
  min-width: 150px;
  margin-top: 6px;
}

/* Change Password */
button[onclick*="changePassword"],
button[onclick*="updatePassword"],
.change-password-button {
  width: fit-content !important;
  min-width: 160px;
  margin-top: 6px;
}

/* Keep compact buttons flat */
button[onclick*="createGroup"],
button[onclick*="saveProfile"],
button[onclick*="updateProfile"],
button[onclick*="changePassword"],
button[onclick*="updatePassword"] {
  box-shadow: none !important;
}

/* =========================
   PROFILE FORM SPACING
========================= */

.auth-card button,
.card button {
  margin-top: 12px;
}

input + button {
  margin-top: 14px !important;
}

/* =========================
   PROFILE — EXTRA BOTTOM SPACE
========================= */

#content {
  padding-bottom: 120px !important;
}

@media (max-width: 700px) {
  #content {
    padding-bottom: 150px !important;
  }
}

/* =========================
   CENTERED MODALS
========================= */

@media (max-width: 700px) {
  .modal {
    align-items: center;
    justify-content: center;
    padding: 18px;
  }

  .modal-card {
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 36px);
    border-radius: 25px;
  }
}

/* =========================
   CLOSE GROUP / HISTORY
========================= */

.group-close-section {
  width: 100%;
  max-width: 520px;
  margin: 28px auto 10px;
  padding: 18px 0 4px;
  text-align: center;
  border-top: 1px dashed var(--border);
}

.group-close-note {
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.close-group-button {
  width: fit-content !important;
  min-width: 180px;
  padding: 11px 20px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1px solid #cce5d6;
  border-radius: 13px;
  font-weight: 900;
  box-shadow: none !important;
}

.close-group-button:hover {
  background: #d8eee1;
  box-shadow: none !important;
}

.group-closed-banner {
  width: 100%;
  max-width: 520px;
  margin: 28px auto 10px;
  padding: 14px 16px;
  text-align: center;
  background: var(--green-soft);
  color: var(--green);
  border: 1px solid #cfe8d8;
  border-radius: 15px;
  font-weight: 900;
}

/* =========================================
   OweMe — Toast
   ========================================= */

.toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  z-index: 9999;

  width: min(420px, calc(100% - 32px));
  padding: 14px 18px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--card);
  color: var(--text);

  border: 1px solid var(--border);
  border-radius: 16px;

  box-shadow: 0 10px 28px rgba(38, 68, 58, 0.14);

  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transform: translate(-50%, 10px);
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s ease;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

@media (max-width: 700px) {
  .toast {
    bottom: 88px;
    width: calc(100% - 32px);
    padding: 13px 16px;
    border-radius: 15px;
    font-size: 13px;
  }
}

/* =========================================
   OweMe — Close Group Confirmation
   ========================================= */

.close-group-modal {
  padding: 18px 8px 8px;
  text-align: center;
}

.close-group-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: var(--primary-soft);
  color: var(--primary-dark);

  border: 1px solid #cce5d6;
  border-radius: 50%;

  font-size: 22px;
  font-weight: 900;
}

.close-group-modal h2 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
  line-height: 1.25;
}

.close-group-modal-text {
  margin: 0 auto 8px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

.close-group-modal-note {
  max-width: 420px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.close-group-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.close-group-actions button {
  width: fit-content !important;
  min-width: 120px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 12px;
  box-shadow: none !important;
  font-weight: 800;
}

.close-group-actions .secondary-button {
  background: var(--card-soft);
  color: var(--text);
  border: 1px solid var(--border);
}

.close-group-actions .secondary-button:hover {
  background: var(--primary-soft);
}

.close-group-confirm-button {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
}

.close-group-confirm-button:hover {
  background: var(--primary-dark);
}

@media (max-width: 500px) {
  .close-group-confirmation-actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
    width: 100%;
  }

  .close-group-confirmation-actions button {
    flex: 1;
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    white-space: nowrap;
    min-height: 48px;
    height: 48px;
  }
}


/* =========================
   GLOBAL LOADING OVERLAY
========================= */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(243, 248, 243, 0.78);
  backdrop-filter: blur(3px);
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--border);
  border-top-color: var(--primary-dark);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-overlay.hidden {
  display: none;
}


/* History group actions */
.history-group-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.history-group-actions button {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  white-space: nowrap;
}

/* Keep transaction dates on one line on mobile */
#transactionsTableBody tr td:first-child {
  white-space: nowrap;
  min-width: 105px;
}

/* =========================
   COMPACT ACTION BUTTONS
========================= */

#content button.primary-button,
#content .primary-button,
#content .add-expense-button,
#content .action-button,
#content .secondary-button,
#content .success-button,
#content .danger-button,
#content .small-button,
#content .table-action,
#content .close-group-button,
#content .close-group-confirm-button {
  width: fit-content;
  max-width: 100%;
}

/* Main action buttons */
#content .primary-button,
#content .add-expense-button {
  min-width: 180px;
  padding-left: 22px;
  padding-right: 22px;
}

/* Smaller action buttons */
#content .action-button,
#content .secondary-button,
#content .success-button,
#content .danger-button,
#content .close-group-button,
#content .close-group-confirm-button {
  min-width: 140px;
}

/* Keep buttons from stretching inside action rows */
#content .action-row > button,
#content .button-row > button {
  width: fit-content;
}

/* Auth buttons remain full-width */
.auth-card .primary-button,
.auth-card button.primary-button {
  width: 100%;
}


/* Center compact action buttons */
#content .primary-button,
#content .add-expense-button,
#content .action-button,
#content .secondary-button,
#content .success-button,
#content .danger-button,
#content .small-button,
#content .table-action,
#content .close-group-button,
#content .close-group-confirm-button {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

#content .action-row,
#content .button-row {
  justify-content: center;
}


/* =========================
   COMPACT MODAL ACTIONS
========================= */

.modal .primary-button,
.modal .add-expense-button,
.modal .secondary-button,
.modal .success-button,
.modal .danger-button,
.modal .close-group-confirm-button,
.modal .close-group-cancel-button {
  width: fit-content !important;
  min-width: 180px;
  max-width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
}

.modal .secondary-button,
.modal .close-group-cancel-button {
  min-width: 140px;
}

.modal .action-row,
.modal .button-row {
  justify-content: center;
}


/* Center Add Expense modal action */
#addExpenseForm > .primary-button {
  display: block;
  width: fit-content !important;
  min-width: 180px;
  margin: 18px auto 0 !important;
}


/* Keep Create Group helper text and button on separate rows */
#createGroupForm .field-help {
  display: block;
  width: 100%;
  clear: both;
  margin-bottom: 16px;
}

#createGroupForm > .primary-button {
  display: block;
  width: fit-content !important;
  min-width: 180px;
  margin: 0 auto !important;
  clear: both;
}


/* Add spacing before Send Invitation */
#addMemberForm button[type="submit"] {
  margin-top: 16px !important;
}


/* More breathing room before Send Invitation */
#addMemberForm button[type="submit"] {
  display: block;
  margin-top: 28px !important;
}


/* Add breathing room before Send Invitation */
#inviteMemberForm > button.primary-button {
  display: block;
  margin-top: 28px !important;
}


/* Payment detail action buttons */
.payment-detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.payment-detail-actions button {
  width: fit-content !important;
  min-width: 110px;
  flex: 0 0 auto;
}


/* Stack payment detail actions vertically */
.payment-detail-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
}

.payment-detail-actions button {
  width: fit-content !important;
  min-width: 110px;
  flex: none;
}


/* Payment detail delete button */
.payment-detail-actions button[onclick*="delete"],
.payment-detail-actions .danger-button {
  background: var(--red-soft) !important;
  color: var(--red) !important;
}


/* Payment detail actions */
.payment-detail-actions,
.payment-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.payment-detail-actions button,
.payment-actions button {
  width: fit-content !important;
  min-width: 110px;
}

/* Delete payment detail */
button[onclick^="deletePaymentDetails"] {
  background: var(--red-soft) !important;
  color: var(--red) !important;
}


/* Payment details: information first, actions underneath */
#paymentDetailsList > div > div {
  flex-direction: column !important;
  align-items: stretch !important;
}

#paymentDetailsList > div > div > div:last-child {
  width: 100% !important;
  margin-top: 16px !important;
}

#paymentDetailsList > div > div > div:last-child > div {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
}

#paymentDetailsList button[onclick^="editPaymentDetails"],
#paymentDetailsList button[onclick^="deletePaymentDetails"] {
  width: fit-content !important;
  min-width: 110px;
}

#paymentDetailsList button[onclick^="deletePaymentDetails"] {
  background: var(--red-soft) !important;
  color: var(--red) !important;
}


/* Center payment detail actions */
#paymentDetailsList > div > div > div:last-child {
  display: flex !important;
  justify-content: center !important;
}

#paymentDetailsList > div > div > div:last-child > div {
  justify-content: center !important;
}


/* Center Edit/Delete buttons as a group */
#paymentDetailsList button[onclick^="editPaymentDetails"],
#paymentDetailsList button[onclick^="deletePaymentDetails"] {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

#paymentDetailsList > div > div > div:last-child {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
}

#paymentDetailsList > div > div > div:last-child > div {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 12px !important;
}


/* Decline invitation */
.action-button.red-button {
  background: var(--red-soft) !important;
  color: var(--red) !important;
}


/* Payment detail action buttons — equal compact widths */
#paymentDetailsList button[onclick^="viewPaymentQr"],
#paymentDetailsList button[onclick^="editPaymentDetails"],
#paymentDetailsList button[onclick^="deletePaymentDetails"] {
  width: 110px !important;
  min-width: 110px !important;
  max-width: 110px !important;
  flex: 0 0 110px !important;
  margin: 0 !important;
  padding: 11px 16px !important;
}

#paymentDetailsList > div > div > div:last-child {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
}

#paymentDetailsList > div > div > div:last-child > div {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
}

@media (max-width: 500px) {
  #paymentDetailsList button[onclick^="viewPaymentQr"],
  #paymentDetailsList button[onclick^="editPaymentDetails"],
  #paymentDetailsList button[onclick^="deletePaymentDetails"] {
    width: 90px !important;
    min-width: 90px !important;
    max-width: 90px !important;
    flex-basis: 90px !important;
    padding: 10px 8px !important;
  }

  #paymentDetailsList > div > div > div:last-child > div {
    gap: 8px !important;
  }
}


/* Payment QR modal */
.payment-qr-modal {
  text-align: center;
}

.payment-qr-modal h2 {
  margin-bottom: 6px;
}

.payment-qr-modal .muted {
  margin-bottom: 4px;
}

.payment-qr-image {
  display: block;
  width: min(320px, 100%);
  max-height: 60vh;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
}


/* Space between shared expense cards */
.shared-expense-card {
  margin-bottom: 12px !important;
}

.shared-expense-card:last-child {
  margin-bottom: 0 !important;
}

/* Add breathing room between detail rows */
.balance-detail-row {
  margin-bottom: 12px !important;
}

.balance-detail-row:last-child {
  margin-bottom: 0 !important;
}

/* Space between receivable cards */
.balance-detail-list .balance-detail-row {
  margin-bottom: 12px !important;
}

.balance-detail-list .balance-detail-row:last-child {
  margin-bottom: 0 !important;
}

/* Reject payment button */
button[onclick*="rejectPayment"],
button[onclick*="rejectPaymentSubmission"] {
  background: var(--red-soft) !important;
  color: var(--red) !important;
  border-color: transparent !important;
}


button[onclick*="openRejectPayment"] {
  background: var(--red-soft) !important;
  color: var(--red) !important;
  border-color: transparent !important;
}

.reject-payment-button {
  background: var(--red-soft) !important;
  color: var(--red) !important;
  border-color: transparent !important;
}
.balance-positive {
  color: var(--green) !important;
}

.balance-negative {
  color: var(--red) !important;
}

/* ===== FIXED APP VIEWPORT ===== */

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  overscroll-behavior: none;
}

#app {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  position: relative;
}

#mainApp {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  flex: 0 0 auto;
}

#content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.bottom-nav {
  flex: 0 0 auto;
}
.header-action-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none !important;
  font-size: 24px;
  line-height: 1;
}

.header-action-button:hover {
  background: var(--primary-soft);
}

.header-action-button:active {
  transform: none;
}

/* ===== NOTIFICATION BELL ===== */

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notification-button {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none !important;
}

.notification-button:hover {
  background: var(--yellow-soft);
}

.notification-bell {
  font-size: 20px;
  line-height: 1;
}

.notification-badge {
  position: absolute;
  top: 2px;
  right: 1px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--yellow);
  color: #5c4b00;
  font-size: 10px;
  font-weight: 800;
  line-height: 17px;
  text-align: center;
  border: 2px solid var(--card);
}

.notification-badge.hidden {
  display: none;
}


/* ===== TOPBAR LAYOUT ===== */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}


/* ===== FORCE NOTIFICATION BELL VISIBILITY ===== */

.notification-button {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  width: 42px !important;
  height: 42px !important;
  min-width: 42px !important;
  flex-shrink: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--yellow-soft) !important;
  border: 1px solid var(--yellow) !important;
  color: var(--text) !important;
}

.notification-bell {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-size: 22px !important;
  line-height: 1 !important;
}


/* ===== NOTIFICATION BELL ICON SIZE ===== */
.notification-bell {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
}

.notification-bell svg {
  display: block !important;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
}

/* ===== HEADER PAGE TITLE ===== */
#pageTitle {
  display: none !important;
}

/* ===== OweMe HEADER ===== */

.brand-header {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-header .app-name {
  margin: 0;
}

#pageTitle {
  display: none !important;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.notification-button {
  position: relative;
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  border: 1px solid var(--yellow);
  border-radius: 50%;
  background: var(--yellow-soft);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none !important;
}

.notification-button:hover {
  background: var(--yellow-soft);
}

.notification-bell {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.notification-bell svg {
  display: block;
  width: 22px;
  height: 22px;
}



/* Add breathing room before Create Account */
#registerForm > button[type="submit"] {
  margin-top: 18px !important;
}


/* Dynamic expense split */
.expense-split-section {
  margin-top: 22px;
}

.split-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 5px;
  margin-bottom: 14px;
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.split-mode-button {
  width: 100% !important;
  padding: 10px 14px !important;
  background: transparent !important;
  color: var(--muted) !important;
  border: 0 !important;
  border-radius: 10px !important;
  font-weight: 850 !important;
}

.split-mode-button.active {
  background: var(--primary-soft) !important;
  color: var(--primary-dark) !important;
}

.expense-share-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 12px;
  margin-bottom: 8px;
  background: var(--card-soft);
  border: 1px solid var(--border);
  border-radius: 13px;
}

.expense-share-input-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 118px;
  padding: 0 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.expense-share-input-wrap > span {
  color: var(--muted);
  font-weight: 800;
}

.expense-share-input-wrap input {
  width: 100%;
  min-width: 0;
  padding: 9px 2px;
  border: 0;
  background: transparent;
  text-align: right;
  font-weight: 850;
}

.expense-share-input-wrap input[readonly] {
  color: var(--text);
}

.expense-share-input-wrap input:focus {
  outline: none;
}

.expense-split-summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  margin-top: 12px;
  background: var(--red-soft);
  border: 1px solid rgba(217, 120, 120, 0.25);
  border-radius: 14px;
}

.expense-split-summary > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.expense-split-summary span {
  color: var(--muted);
  font-size: 12px;
}

.expense-split-summary strong {
  color: var(--red);
}

.expense-split-summary.valid {
  background: var(--green-soft);
  border-color: rgba(94, 170, 130, 0.25);
}

.expense-split-summary.valid strong {
  color: var(--green);
}

.expense-empty-state {
  padding: 15px;
  color: var(--muted);
  background: var(--card-soft);
  border: 1px dashed var(--border);
  border-radius: 13px;
  text-align: center;
}

#addExpenseForm > .primary-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Optional expense receipt */
.expense-receipt-section {
  margin-top: 22px;
}

.receipt-upload-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  padding: 13px 15px;
  background: var(--card-soft);
  border: 1px dashed var(--border);
  border-radius: 13px;
  color: var(--primary-dark);
  font-weight: 800;
  cursor: pointer;
}

.receipt-upload-box:hover {
  background: var(--primary-soft);
}

.receipt-upload-icon {
  font-size: 18px;
}


/* =========================================
   PWA VIEWPORT BREATHING ROOM
   Keep the fixed header stable while giving
   page content and the bottom nav clear space.
========================================= */

.topbar {
  padding-top: max(18px, env(safe-area-inset-top));
  padding-bottom: 4px;
}

#content {
  padding-top: 34px !important;
  padding-bottom: calc(
    var(--nav-height) + 52px + env(safe-area-inset-bottom)
  ) !important;
}

@media (max-width: 700px) {
  .topbar {
    padding-top: max(17px, env(safe-area-inset-top));
    padding-bottom: 17px;
  }

  #content {
    padding-top: 32px !important;
    padding-bottom: calc(
      68px + 48px + env(safe-area-inset-bottom)
    ) !important;
  }
}


/* =========================================
   PWA MODAL — SAFE VIEWPORT / NO OVERLAP
========================================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(16px, env(safe-area-inset-top))
    max(12px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(12px, env(safe-area-inset-left));
  overflow: hidden;
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-width: 560px;
  max-height: calc(
    100dvh
    - env(safe-area-inset-top)
    - env(safe-area-inset-bottom)
    - 32px
  );
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 60px 23px 24px;
}

#modalContent {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 0 2px 8px;
}

#modalContent > :first-child {
  margin-top: 0;
}

.modal-card > .modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
}

.modal-card .modal-close {
  flex: 0 0 auto;
}

@media (max-width: 700px) {
  .modal {
    align-items: center;
    padding:
      max(12px, env(safe-area-inset-top))
      10px
      max(12px, env(safe-area-inset-bottom))
      10px;
  }

  .modal-card {
    width: 100%;
    max-width: 100%;
    max-height: calc(
      100dvh
      - env(safe-area-inset-top)
      - env(safe-area-inset-bottom)
      - 24px
    );
    padding: 58px 16px 20px;
    border-radius: 25px;
  }

  #modalContent {
    padding-bottom: 4px;
  }
}


/* =========================================
   MOBILE CARD INSET — BROWSER + PWA
========================================= */

@media (max-width: 430px) {
  #mainApp #content .card,
  #mainApp #content .group-card,
  #mainApp #content .expense-card,
  #mainApp #content .summary-card,
  #mainApp #content .member-row,
  #mainApp #content .settlement-row,
  #mainApp #content .invitation-row {
    width: calc(100% - 16px) !important;
    max-width: none !important;
    margin-left: 8px !important;
    margin-right: 8px !important;
    box-sizing: border-box;
  }
}


/* =========================================
   MOBILE MODAL — TRUE FLOATING CARD
========================================= */

@media (max-width: 700px) {
  .modal {
    align-items: center !important;
    justify-content: center !important;
    padding:
      calc(env(safe-area-inset-top) + 24px)
      20px
      calc(env(safe-area-inset-bottom) + 24px)
      20px !important;
    box-sizing: border-box;
  }

  .modal-card {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(
      100dvh
      - env(safe-area-inset-top)
      - env(safe-area-inset-bottom)
      - 48px
    ) !important;
    margin: 0 !important;
    border-radius: 28px !important;
    box-shadow: 0 24px 60px rgba(38, 68, 58, 0.28) !important;
  }
}


/* =========================================
   MODAL FINAL LAYOUT — FLOATING VIEWPORT
========================================= */

#mainApp > .modal {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  margin: 0 !important;
  padding: 24px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 2000 !important;
  overflow: hidden !important;
}

#mainApp > .modal .modal-backdrop {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
}

#mainApp > .modal .modal-card {
  position: relative !important;
  z-index: 1 !important;
  width: min(560px, 100%) !important;
  height: auto !important;
  max-height: calc(100dvh - 48px) !important;
  min-height: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  border-radius: 28px !important;
  overflow: hidden !important;
}

@media (max-width: 700px) {
  #mainApp > .modal {
    padding:
      max(24px, env(safe-area-inset-top) + 16px)
      16px
      max(24px, env(safe-area-inset-bottom) + 16px)
      16px !important;
  }

  #mainApp > .modal .modal-card {
    width: 100% !important;
    max-width: 398px !important;
    max-height: calc(
      100dvh
      - env(safe-area-inset-top)
      - env(safe-area-inset-bottom)
      - 48px
    ) !important;
    border-radius: 28px !important;
  }
}


/* Modal lives directly under body; keep it above the entire app shell. */
body > #modal.hidden {
  display: none !important;
}


body > #modal {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100dvh !important;
  padding: 24px !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 99999 !important;
  overflow: hidden !important;
}

body > #modal .modal-card {
  position: relative !important;
  z-index: 100000 !important;
  width: min(560px, 100%) !important;
  max-width: 560px !important;
  max-height: calc(100dvh - 48px) !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  border-radius: 28px !important;
  overflow: hidden !important;
}

body > #modal .modal-backdrop {
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
}

@media (max-width: 700px) {
  body > #modal {
    padding:
      max(24px, env(safe-area-inset-top) + 16px)
      16px
      max(24px, env(safe-area-inset-bottom) + 16px)
      16px !important;
  }

  body > #modal .modal-card {
    width: 100% !important;
    max-width: 398px !important;
    max-height: calc(
      100dvh
      - env(safe-area-inset-top)
      - env(safe-area-inset-bottom)
      - 48px
    ) !important;
  }
}


.table-action-buttons {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.table-action-buttons .table-action-button {
  flex: 0 0 auto;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
}

/* Receivables: add breathing room between name, amount, and action */
.balance-detail-row .user-name {
  margin-bottom: 6px;
}

.balance-detail-row > div:first-child .muted {
  margin-top: 0;
  margin-bottom: 8px;
}

.balance-detail-row > button {
  margin-top: 4px;
}


/* Align balance action buttons to the left */
.balance-section > button {
  justify-self: start;
  margin-left: 0 !important;
}


/* Add space between people count and balance action */
.balance-section > button {
  margin-top: 10px !important;
}



/* Larger OweMe header branding */
.brand-logo {
  width: 42px;
  height: 42px;
}

.brand-header .app-name {
  font-size: 22px;
  font-weight: 800;
}


.balance-message {
  margin-top: 8px;
  font-size: 14px;
}


/* Profile account details */
.profile-account-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 16px 0;
}

.profile-account-details strong {
  font-weight: 800;
}

.profile-account-card > button {
  margin-top: 8px;
}


/* Saved payment details */
.payment-detail-card {
  margin-top: 12px;
}

.payment-detail-content {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.payment-detail-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payment-detail-row {
  display: flex;
  gap: 5px;
  align-items: baseline;
  line-height: 1.4;
}

.payment-detail-row strong {
  font-weight: 800;
  white-space: nowrap;
}

.payment-detail-row span {
  word-break: break-word;
}

.payment-detail-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.payment-detail-action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}

.payment-detail-action-buttons button {
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  white-space: nowrap;
}

.payment-detail-qr {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.payment-detail-qr-label {
  font-weight: 600;
}

.payment-detail-qr-image {
  width: 180px;
  height: 180px;
  object-fit: contain;
  border: 1px solid var(--border-color, #ddd);
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  display: block;
}

.payment-detail-qr-button {
  width: auto !important;
  margin: 0 !important;
}

@media (max-width: 600px) {

  .payment-detail-content {
    flex-direction: column;
    gap: 14px;
  }

  .payment-detail-actions {
    width: 100%;
    align-items: flex-start;
  }

  .payment-detail-action-buttons {
    width: 100%;
  }

  .payment-detail-action-buttons button {
    flex: 1;
  }

}


.profile-account-card > button {
  align-self: flex-start !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}


/* Add breathing room before modal form buttons */
#profileForm button[type="submit"],
#passwordForm button[type="submit"] {
  margin-top: 16px !important;
}


/* Delete confirmation modal */
#modalContent .danger-button {
  background: #f8dede !important;
  color: #d96b6b !important;
}


/* Delete confirmation modal */
#modalContent .danger-button {
  background: #e57373 !important;
  color: #ffffff !important;
}


.home-intro {
  margin: 4px 0 24px;
  padding: 0 8px;
}

.home-intro h2 {
  margin: 0 0 8px;
}

.home-intro p {
  margin: 0;
}


.history-group-actions button {
  height: 48px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}


.history-group-actions button {
  height: 40px !important;
  padding: 0 16px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}


.members-button {
  background: var(--yellow-soft) !important;
  color: #8a7420 !important;
  border: 1px solid #f0df91 !important;
}


/* Transaction action button colors */
.table-action-button.view-action-button {
  background: var(--green-soft) !important;
  color: var(--green) !important;
  border: 1px solid #cce8d7 !important;
}

.table-action-button.delete-action-button {
  background: var(--red-soft) !important;
  color: var(--red) !important;
  border: 1px solid #f1cccc !important;
}

.table-action-button.review-action-button {
  background: var(--yellow-soft) !important;
  color: #8a7420 !important;
  border: 1px solid #f0df91 !important;
}


/* Members button — pastel yellow */
.members-button {
  background: var(--yellow-soft) !important;
  color: #8a7420 !important;
  border: 1px solid #f0df91 !important;
}

/* Transaction action button colors */
.table-action-button.view-action-button {
  background: var(--green-soft) !important;
  color: var(--green) !important;
  border: 1px solid #cce8d7 !important;
}

.table-action-button.delete-action-button {
  background: var(--red-soft) !important;
  color: var(--red) !important;
  border: 1px solid #f1cccc !important;
}

.table-action-button.review-action-button {
  background: var(--yellow-soft) !important;
  color: #8a7420 !important;
  border: 1px solid #f0df91 !important;
}

/* Saved payment detail buttons — compact and centered */
.payment-detail-action-buttons {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.payment-detail-action-buttons button {
  flex: 0 1 85px !important;
  width: 85px !important;
  min-width: 0 !important;
  max-width: 85px !important;
  height: 42px !important;
  padding: 8px 6px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}

@media (max-width: 600px) {
  .payment-detail-action-buttons {
    width: 100% !important;
    padding: 0 8px !important;
    gap: 8px !important;
  }

  .payment-detail-action-buttons button {
    flex: 0 1 85px !important;
    width: 85px !important;
    min-width: 0 !important;
    max-width: 85px !important;
  }
}


/* Payment detail buttons — smaller fixed width */
.payment-detail-action-buttons {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

.payment-detail-action-buttons button {
  flex: 0 0 72px !important;
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
  height: 40px !important;
  padding: 6px 4px !important;
  margin: 0 !important;
  font-size: 13px !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}

@media (max-width: 600px) {
  .payment-detail-action-buttons {
    gap: 7px !important;
    padding: 0 !important;
  }

  .payment-detail-action-buttons button {
    flex: 0 0 68px !important;
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    height: 38px !important;
    padding: 5px 3px !important;
    font-size: 12px !important;
  }
}


/* Payment detail buttons — extra narrow */
.payment-detail-action-buttons {
  gap: 6px !important;
  justify-content: center !important;
}

.payment-detail-action-buttons button {
  flex: 0 0 60px !important;
  width: 60px !important;
  min-width: 60px !important;
  max-width: 60px !important;
  height: 36px !important;
  padding: 4px 2px !important;
  font-size: 11px !important;
}

@media (max-width: 600px) {
  .payment-detail-action-buttons {
    gap: 6px !important;
    padding: 0 !important;
  }

  .payment-detail-action-buttons button {
    flex: 0 0 58px !important;
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    height: 34px !important;
    padding: 3px 2px !important;
    font-size: 11px !important;
  }
}


/* Payment detail buttons — force compact width */
.payment-detail-actions .payment-detail-action-buttons {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 6px !important;
  width: 100% !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

.payment-detail-actions .payment-detail-action-buttons > button {
  flex: 0 0 60px !important;
  width: 60px !important;
  min-width: 60px !important;
  max-width: 60px !important;
  height: 34px !important;
  padding: 4px 2px !important;
  margin: 0 !important;
  font-size: 11px !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}

@media (max-width: 600px) {
  .payment-detail-actions .payment-detail-action-buttons > button {
    flex: 0 0 58px !important;
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
    height: 34px !important;
    padding: 3px 2px !important;
    font-size: 11px !important;
  }
}


.payment-detail-button {
  width: 58px !important;
  min-width: 58px !important;
  max-width: 58px !important;
  flex: 0 0 58px !important;
  padding: 8px 2px !important;
  margin: 0 !important;
  font-size: 12px !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}


.payment-detail-button {
  width: 58px !important;
  min-width: 58px !important;
  max-width: 58px !important;
}



.close-group-confirm-button {
  background: var(--red-soft) !important;
  color: var(--red) !important;
  border: 1px solid #f1cccc !important;
}


.close-group-actions .close-group-confirm-button {
  background: var(--red-soft) !important;
  color: var(--red) !important;
  border: 1px solid #f1cccc !important;
}


.close-group-actions .close-group-confirm-button {
  background: var(--red-soft) !important;
  color: var(--red) !important;
  border: 1px solid #f1cccc !important;
}


.close-group-button {
  background: var(--red-soft) !important;
  color: var(--red) !important;
  border: 1px solid #f1cccc !important;
}


/* =========================================================
   NOTIFICATIONS
========================================================= */

.notifications-panel {
  width: 100%;
}

.notifications-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}

.notifications-header h2 {
  margin: 0 0 6px;
}

.notifications-header p {
  margin: 0;
}

.notifications-header .secondary-button {
  width: auto !important;
  min-width: 0 !important;
  white-space: nowrap;
  margin: 0 !important;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notification-item {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 14px !important;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-soft);
  color: var(--text);
  text-align: left;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
}

.notification-item.unread {
  background: var(--primary-soft);
  border-color: #cfe7dc;
}

.notification-item-content {
  min-width: 0;
  flex: 1;
}

.notification-item-title {
  font-weight: 800;
  margin-bottom: 4px;
}

.notification-item-message {
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}

.notification-item-time {
  margin-top: 7px;
  font-size: 12px;
  color: var(--muted);
}

.notification-unread-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--primary);
}

@media (max-width: 600px) {

  .notifications-header {
    flex-direction: column;
  }

  .notifications-header .secondary-button {
    align-self: flex-start;
  }

}


.nudge-last-sent {
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
}

.receivable-action-buttons {
  margin-top: 10px !important;
}

.payment-detail-payme-button {
  width: auto !important;
  min-width: 0 !important;
  margin-top: 12px !important;
}

.payme-link-card {
  margin-top: 16px;
}

.payme-link-url {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card-soft);
  font-size: 13px;
  line-height: 1.4;
  word-break: break-all;
}

.payme-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.payme-link-actions button {
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.payme-receivable-button {
  background: var(--yellow-soft) !important;
  color: #8a7420 !important;
  border: 1px solid #f0df91 !important;
}


/* =========================================================
   CONTACTS
   ========================================================= */

.contacts-search {
  margin-bottom: 14px;
}

.contacts-search input {
  width: 100%;
  box-sizing: border-box;
}

.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-card {
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.contact-card:active {
  transform: scale(0.99);
}

.contact-card-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.contact-card-main .user-name {
  margin-bottom: 4px;
}

.contact-display-name {
  font-size: 14px;
}

.contact-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 500px) {

  .contact-card {
    padding: 14px;
  }

  .contact-card-meta {
    font-size: 11px;
  }

}


/* =========================================================
   INVITE CONTACT SEARCH
   ========================================================= */

.invite-contacts-search {
  margin-bottom: 8px;
}

.invite-contact-suggestions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.invite-contact-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  margin: 0 !important;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
}

.invite-contact-suggestion span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.invite-contact-suggestion small {
  font-size: 12px;
}

.invite-contact-empty {
  padding: 10px 4px;
  font-size: 13px;
  color: var(--muted);
}

.invite-manual-label {
  margin: 8px 0 8px;
  font-size: 13px;
  color: var(--muted);
}


/* =========================================================
   INVITATION ACTIONS
   ========================================================= */

.action-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.action-row .action-button {
  flex: 1 1 0;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  box-sizing: border-box;
}

@media (max-width: 500px) {

  .action-row {
    gap: 10px;
  }

  .action-row .action-button {
    flex: 1 1 0;
    min-width: 0 !important;
    white-space: nowrap;
  }

}


/* =========================================================
   CREATE GROUP MEMBER SELECTOR
   ========================================================= */

.create-group-member-search {
  margin-bottom: 8px;
}

.selected-members-title {
  margin: 14px 0 8px;
  font-size: 13px;
  color: var(--muted);
}

.selected-members-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.selected-members-empty {
  padding: 10px 4px;
  font-size: 13px;
  color: var(--muted);
}

.selected-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}

.selected-member-display-name {
  margin-top: 3px;
  font-size: 12px;
}

.selected-member-remove {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px;
  background: var(--primary-soft) !important;
  color: var(--primary) !important;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

@media (max-width: 500px) {

  .selected-member-row {
    padding: 10px 12px;
  }

}


/* =========================================================
   COMPACT MEMBERS LIST
   ========================================================= */

.members-list-card {
  padding: 6px 14px;
}

.members-list-card .member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
}

.members-list-card .member-row:last-child {
  border-bottom: 0;
}

.member-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.member-username {
  font-weight: 700;
  white-space: nowrap;
}

.member-display-name {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-role {
  flex: 0 0 auto;
  white-space: nowrap;
  color: var(--text);
}

@media (max-width: 500px) {

  .members-list-card {
    padding: 4px 12px;
  }

  .members-list-card .member-row {
    gap: 8px;
    padding: 13px 2px;
  }

  .member-identity {
    gap: 6px;
  }

  .member-display-name {
    max-width: 110px;
  }

  .member-role {
    font-size: 11px;
  }

}


/* =========================================================
   MEMBERS — SIMPLE ONE-LINE LIST
   ========================================================= */

.members-list-card {
  padding: 0 !important;
  overflow: hidden;
}

.members-list-card .member-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;

  width: 100% !important;
  box-sizing: border-box !important;

  padding: 6px 16px !important;
  margin: 0 !important;

  border: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;

  background: transparent !important;
  box-shadow: none !important;
}

.members-list-card .member-row:last-child {
  border-bottom: 0 !important;
}

.members-list-card .member-identity {
  display: flex !important;
  flex-direction: row !important;
  align-items: baseline !important;
  justify-content: flex-start !important;
  gap: 7px !important;

  min-width: 0 !important;
  flex: 1 !important;
}

.members-list-card .member-username {
  font-weight: 700 !important;
  white-space: nowrap !important;
}

.members-list-card .member-display-name {
  color: var(--muted) !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.members-list-card .member-role {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
  font-size: 12px !important;
  color: var(--text) !important;
}

@media (max-width: 500px) {

  .members-list-card .member-row {
    padding: 6px 14px !important;
  }

  .members-list-card .member-identity {
    gap: 6px !important;
  }

  .members-list-card .member-display-name {
    max-width: 130px !important;
  }

  .members-list-card .member-role {
    font-size: 11px !important;
  }

}


/* =========================================================
   SETTLE UP — PAYMENT METHOD
   ========================================================= */

.settle-payment-option {
  display: flex !important;
  align-items: flex-start !important;
  gap: 12px !important;
  cursor: pointer;
  margin-top: 10px !important;
  padding: 16px !important;
}

.settle-payment-radio {
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  margin: 3px 0 0 !important;
  padding: 0 !important;
  accent-color: #4f8f68 !important;
  cursor: pointer;
}

.settle-payment-option > div {
  flex: 1;
  min-width: 0;
}

.settle-payment-option > div > div:first-child {
  margin-bottom: 7px;
}

.settle-payment-option .muted {
  margin-top: 4px;
  line-height: 1.45;
}

.settle-payment-option .muted strong {
  color: var(--text);
}

.settle-payment-qr-button {
  display: inline-flex !important;
  width: fit-content !important;
  margin-top: 12px !important;
  padding: 9px 14px !important;
  text-decoration: none !important;
}

@media (max-width: 500px) {
  .settle-payment-option {
    padding: 14px !important;
    gap: 10px !important;
  }

  .settle-payment-radio {
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
  }
}


/* Green preferred payment checkbox */
input[type="checkbox"] {
  accent-color: #4f8f68 !important;
}


/* =========================================================
   ICON-ONLY BOTTOM NAVIGATION
   ========================================================= */

.bottom-nav .nav-item {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.bottom-nav .nav-item svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.bottom-nav .nav-item small {
  display: none !important;
}

/* Notification bell */
.notification-bell svg {
  width: 23px;
  height: 23px;
  display: block;
}


/* =========================================================
   HISTORY — INLINE ACTION ICONS
   ========================================================= */

.history-group-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.history-group-meta-row p {
  margin: 0 !important;
  min-width: 0;
}

.history-group-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  margin: 0 !important;
}

.history-icon-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 10px;
  cursor: pointer;
}

.history-icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.history-delete-button {
  background: var(--danger-soft, #fdecec) !important;
  color: #d96b6b !important;
}

.history-view-button {
  background: var(--primary-soft) !important;
  color: var(--primary) !important;
}

.history-icon-button:active {
  transform: scale(0.95);
}

@media (max-width: 500px) {
  .history-group-meta-row {
    gap: 8px;
  }

  .history-group-actions {
    gap: 6px;
  }

  .history-icon-button {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    border-radius: 9px;
  }

  .history-icon-button svg {
    width: 17px;
    height: 17px;
  }
}


/* Payment detail action buttons — mobile spacing */
@media (max-width: 600px) {
  .payment-detail-actions .payment-detail-action-buttons {
    width: calc(100% - 24px) !important;
    margin-left: 12px !important;
    margin-right: 12px !important;
    gap: 8px !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }

  .payment-detail-actions .payment-detail-action-buttons > button {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: 40px !important;
    padding: 6px 4px !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
  }
}

/* Payment detail buttons — keep clear spacing from card edges */
.payment-detail-actions .payment-detail-action-buttons {
  width: 100% !important;
  padding: 0 12px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 8px !important;
}

.payment-detail-actions .payment-detail-action-buttons > button {
  flex: 1 1 0 !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 40px !important;
  padding: 6px 8px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  font-size: 13px !important;
}

/* Payment detail buttons — extra horizontal breathing room */
.payment-detail-actions .payment-detail-action-buttons {
  width: calc(100% - 32px) !important;
  margin-left: 16px !important;
  margin-right: 16px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: row !important;
  gap: 8px !important;
}

.payment-detail-actions .payment-detail-action-buttons > button {
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 40px !important;
  padding: 6px 4px !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  font-size: 13px !important;
}

/* FINAL FIX — Payment Details action buttons */
.payment-detail-card .payment-detail-actions {
  position: static !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: 100% !important;
  gap: 10px !important;
  box-sizing: border-box !important;
}

.payment-detail-card .payment-detail-action-buttons {
  position: static !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  width: calc(100% - 32px) !important;
  max-width: calc(100% - 32px) !important;
  margin: 0 16px !important;
  padding: 0 !important;
  gap: 8px !important;
  box-sizing: border-box !important;
}

.payment-detail-card .payment-detail-action-buttons > button {
  position: static !important;
  float: none !important;
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 42px !important;
  margin: 0 !important;
  padding: 6px 4px !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}

@media (max-width: 600px) {
  .payment-detail-card .payment-detail-actions {
    width: 100% !important;
  }

  .payment-detail-card .payment-detail-action-buttons {
    width: calc(100% - 32px) !important;
    max-width: calc(100% - 32px) !important;
    margin-left: 16px !important;
    margin-right: 16px !important;
  }
}

/* Payment detail action icons */
.payment-detail-action-buttons .payment-detail-button svg {
  width: 18px;
  height: 18px;
  display: block;
  margin: auto;
  flex-shrink: 0;
}

.payment-detail-action-buttons .payment-detail-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Payment detail icon buttons — no background */
.payment-detail-action-buttons .payment-detail-button {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 6px !important;
}

/* Keep icon colors */
.payment-detail-action-buttons .payment-detail-button svg {
  width: 20px;
  height: 20px;
}

/* Delete icon stays red */
.payment-detail-action-buttons .danger-button {
  background: transparent !important;
  color: var(--red) !important;
  border: none !important;
}

/* Payment detail icons — compact, centered, no button backgrounds */
.payment-detail-card .payment-detail-action-buttons {
  width: auto !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 20px !important;
}

.payment-detail-card .payment-detail-action-buttons > button,
.payment-detail-card .payment-detail-action-buttons > button.payment-detail-button,
.payment-detail-card .payment-detail-action-buttons > button.danger-button {
  flex: 0 0 36px !important;
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  height: 36px !important;
  padding: 4px !important;
  margin: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.payment-detail-card .payment-detail-action-buttons > button svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
  margin: auto !important;
}

.payment-detail-card .payment-detail-action-buttons > button.danger-button {
  color: var(--red) !important;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
}

/* FINAL — compact payment detail icon controls */
#paymentDetailsList .payment-detail-action-buttons {
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 14px !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

#paymentDetailsList .payment-detail-action-buttons > button,
#paymentDetailsList button.payment-detail-button,
#paymentDetailsList button[onclick^="viewPaymentQr"],
#paymentDetailsList button[onclick^="editPaymentDetails"],
#paymentDetailsList button[onclick^="deletePaymentDetails"] {
  position: static !important;
  float: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 36px !important;
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  height: 36px !important;
  padding: 4px !important;
  margin: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

#paymentDetailsList button.payment-detail-button svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
  margin: 0 !important;
}

#paymentDetailsList button[onclick^="deletePaymentDetails"],
#paymentDetailsList button[onclick^="deletePaymentDetails"].danger-button {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--red) !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Groups page tabs */
.groups-tabs {
  width: 100%;
}

.groups-tab {
  flex: 1;
  padding: 11px 14px !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-weight: 700;
  cursor: pointer;
}

.groups-tab.active {
  background: var(--card-soft) !important;
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

@media (max-width: 500px) {
  .groups-tabs {
    gap: 8px;
  }

  .groups-tab {
    font-size: 14px;
  }
}

/* History tabs */
.history-tabs {
  display: flex;
  gap: 8px;
  margin: 18px 0 14px;
}

.history-tab {
  flex: 1;
  padding: 11px 14px !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-weight: 700;
}

.history-tab.active {
  background: var(--card-soft) !important;
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

/* Compact History list */
.history-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.history-list-item:last-child {
  border-bottom: none;
}

.history-list-info {
  min-width: 0;
  flex: 1;
}

.history-list-name {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
}

.history-list-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.history-list-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.history-list-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  padding: 5px !important;
  margin: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.history-list-icon svg {
  width: 19px;
  height: 19px;
  display: block;
}

.history-list-icon.history-view-button {
  color: var(--primary) !important;
}

.history-list-icon.history-delete-button {
  color: var(--red) !important;
}

.history-empty-message {
  padding: 18px 4px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 500px) {
  .history-tabs {
    gap: 8px;
  }

  .history-tab {
    font-size: 14px;
  }

  .history-list-item {
    padding: 13px 2px;
  }
}

.history-list-icon svg {
  width: 18px !important;
  height: 18px !important;
  display: block;
}

/* Invitation list spacing */
.invitation-list-item {
  padding: 16px 4px !important;
  margin-bottom: 8px !important;
}

.invitation-list-item:last-child {
  margin-bottom: 0 !important;
}

.invitation-list-actions {
  margin-left: 12px !important;
}

.invitation-icon-actions {
  gap: 12px !important;
}

.invitation-icon-button {
  width: 34px !important;
  height: 34px !important;
}

/* Invitation icons — override old action-button styles */
.invitation-list-actions .invitation-icon-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

.invitation-list-actions .invitation-icon-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  min-width: 32px !important;
  max-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  padding: 5px !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 50% !important;
  background: transparent !important;
  box-shadow: none !important;
}

.invitation-list-actions .invitation-icon-button svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
}

.invitation-list-actions .invitation-accept-button {
  color: var(--primary) !important;
}

.invitation-list-actions .invitation-decline-button {
  color: var(--red) !important;
}

.invitation-list-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 14px 2px !important;
  margin-bottom: 8px !important;
  border-bottom: 1px solid var(--border) !important;
}

.invitation-list-title {
  font-size: 15px !important;
  font-weight: 700 !important;
}

.invitation-list-meta {
  margin-top: 4px !important;
  font-size: 12px !important;
  color: var(--muted) !important;
}

.invitation-list-actions {
  flex-shrink: 0 !important;
  margin-left: 10px !important;
}

.invitation-list-actions .invitation-status {
  font-size: 11px !important;
  white-space: nowrap !important;
}

@media (max-width: 500px) {
  .invitation-list-actions .invitation-icon-actions {
    gap: 7px !important;
  }

  .invitation-list-actions .invitation-icon-button {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
  }

  .invitation-list-actions .invitation-icon-button svg {
    width: 17px !important;
    height: 17px !important;
  }
}

/* Invitation status colors */
.invitation-list-actions .invitation-status.accepted {
  color: #39744B !important;
  font-weight: 600 !important;
}

.invitation-list-actions .invitation-status.declined {
  color: var(--red) !important;
  font-weight: 600 !important;
}

/* Compact Contacts list */
.contact-list-item {
  display: flex;
  align-items: center;
  padding: 14px 2px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.contact-list-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.contact-list-main {
  min-width: 0;
  width: 100%;
}

.contact-list-primary {
  display: flex;
  align-items: baseline;
  gap: 7px;
  line-height: 1.35;
}

.contact-list-primary strong {
  font-size: 15px;
}

.contact-list-display-name {
  font-size: 14px;
  color: var(--muted);
}

.contact-list-secondary {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
}

.contact-list-separator {
  margin: 0 4px;
}

@media (max-width: 500px) {
  .contact-list-item {
    padding: 13px 2px;
  }

  .contact-list-primary strong {
    font-size: 14px;
  }

  .contact-list-display-name {
    font-size: 13px;
  }

  .contact-list-secondary {
    font-size: 11px;
  }
}

/* Contacts — compact two-line list */
.contact-list-item {
  display: block !important;
  width: 100% !important;
  padding: 14px 2px !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  cursor: pointer;
  box-sizing: border-box !important;
}

.contact-list-item:last-child {
  border-bottom: none !important;
}

.contact-list-main {
  width: 100% !important;
}

.contact-list-primary {
  display: flex !important;
  align-items: baseline !important;
  gap: 7px !important;
  line-height: 1.3 !important;
}

.contact-list-username {
  font-size: 13px !important;
  font-weight: 400 !important;
  color: var(--muted) !important;
}

.contact-list-display-name {
  font-size: 14px !important;
  color: var(--muted) !important;
}

.contact-list-secondary {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 4px !important;
  margin-top: 4px !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  color: var(--muted) !important;
}

.contact-list-separator {
  margin: 0 2px !important;
}

@media (max-width: 500px) {
  .contact-list-item {
    padding: 13px 2px !important;
  }

  .contact-list-username {
    font-size: 14px !important;
  }

  .contact-list-display-name {
    font-size: 13px !important;
  }

  .contact-list-secondary {
    font-size: 11px !important;
  }
}

/* Group page tabs */
.group-page-tabs {
  display: flex;
  width: 100%;
  gap: 4px;
  margin-top: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.group-page-tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 12px 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.group-page-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.group-tab-panel[hidden] {
  display: none !important;
}

.pending-group-list {
  width: 100%;
}

.pending-group-list .settlement-row {
  margin-bottom: 4px;
}

.group-members-tab-actions {
  margin-top: 20px;
}

@media (max-width: 500px) {
  .group-page-tabs {
    margin-top: 18px;
    margin-bottom: 4px;
  }

  .group-page-tab {
    padding: 11px 4px;
    font-size: 12px;
  }
}

/* Group top buttons: one horizontal row */
.group-top-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 8px !important;
  width: 100% !important;
  margin-top: 16px !important;
  margin-bottom: 20px !important;
}

.group-top-actions > button {
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: none !important;
  height: 48px !important;
  min-height: 48px !important;
  margin: 0 !important;
  padding: 8px 6px !important;
  box-sizing: border-box !important;
  font-size: 13px !important;
  white-space: nowrap !important;
}

/* Add Expense: pastel green */
.group-top-actions > .add-expense-button {
  background: #dcefe5 !important;
  background-color: #dcefe5 !important;
  color: #4d9079 !important;
  border-color: #c9e5d7 !important;
}

@media (max-width: 500px) {
  .group-top-actions {
    gap: 6px !important;
  }

  .group-top-actions > button {
    height: 46px !important;
    min-height: 46px !important;
    padding: 7px 4px !important;
    font-size: 12px !important;
  }
}


/* Group page tabs — match History tabs */
.group-page-tabs {
  display: flex !important;
  gap: 14px !important;
  width: 100% !important;
  margin: 18px 0 14px !important;
  border-bottom: 0 !important;
}

.group-page-tab {
  flex: 1 !important;
  padding: 14px 14px !important;
  min-height: 60px !important;
  border: 2px solid var(--border) !important;
  border-radius: 18px !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

.group-page-tab.active {
  background: var(--card-soft) !important;
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

@media (max-width: 500px) {
  .group-page-tabs {
    gap: 12px !important;
  }

  .group-page-tab {
    min-height: 58px !important;
    padding: 13px 8px !important;
    font-size: 14px !important;
    border-radius: 17px !important;
  }
}


/* Group top actions — consistent bordered buttons */
.group-top-actions > .add-expense-button {
  background: var(--primary-soft) !important;
  background-color: var(--primary-soft) !important;
  color: var(--primary-dark) !important;
  border: 1px solid #c9e5d7 !important;
  box-shadow: none !important;
}

.group-top-actions > .members-button {
  background: var(--yellow-soft) !important;
  background-color: var(--yellow-soft) !important;
  color: #806d18 !important;
  border: 1px solid var(--yellow) !important;
  box-shadow: none !important;
}

.group-top-actions > .close-group-button {
  background: var(--red-soft) !important;
  background-color: var(--red-soft) !important;
  color: var(--red) !important;
  border: 1px solid #f1c4c4 !important;
  box-shadow: none !important;
}

/* Group top actions — consistent bordered buttons */
.group-top-actions > .add-expense-button {
  background: var(--primary-soft) !important;
  background-color: var(--primary-soft) !important;
  color: var(--primary-dark) !important;
  border: 1px solid #c9e5d7 !important;
  box-shadow: none !important;
}

.group-top-actions > .members-button {
  background: var(--yellow-soft) !important;
  background-color: var(--yellow-soft) !important;
  color: #806d18 !important;
  border: 1px solid var(--yellow) !important;
  box-shadow: none !important;
}

.group-top-actions > .close-group-button {
  background: var(--red-soft) !important;
  background-color: var(--red-soft) !important;
  color: var(--red) !important;
  border: 1px solid #f1c4c4 !important;
  box-shadow: none !important;
}
/* Group tabs — match History tab design */
.group-page-tabs {
  display: flex !important;
  gap: 14px !important;
  width: 100% !important;
  margin: 18px 0 20px !important;
  padding: 0 !important;
  border: 0 !important;
}

.group-page-tab {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  height: 58px !important;
  min-height: 58px !important;
  padding: 0 8px !important;
  border: 2px solid var(--border) !important;
  border-radius: 18px !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}

.group-page-tab.active {
  background: var(--card-soft) !important;
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

@media (max-width: 500px) {
  .group-page-tabs {
    gap: 10px !important;
    margin-top: 18px !important;
    margin-bottom: 18px !important;
  }

  .group-page-tab {
    height: 54px !important;
    min-height: 54px !important;
    padding: 0 4px !important;
    border-radius: 17px !important;
    font-size: 13px !important;
  }
}
/* EXACT GROUP TAB DESIGN — matched to History tabs */
.group-page-tabs {
  display: flex !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 18px 0 14px !important;
  padding: 0 !important;
  border: 0 !important;
}

.group-page-tab {
  flex: 1 !important;
  padding: 11px 14px !important;
  height: auto !important;
  min-height: 0 !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.group-page-tab.active {
  background: var(--card-soft) !important;
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

@media (max-width: 500px) {
  .group-page-tabs {
    gap: 8px !important;
  }

  .group-page-tab {
    font-size: 14px !important;
  }
}
/* Group action icons */
.group-top-actions .group-icon-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  flex: 0 0 80px !important;
  width: 80px !important;
  min-width: 80px !important;
  max-width: 80px !important;
  padding: 0 6px !important;
}

.group-top-actions .group-icon-action svg {
  width: 21px !important;
  height: 21px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.group-action-plus,
.group-action-close {
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
}

@media (max-width: 500px) {
  .group-top-actions .group-icon-action {
    flex-basis: 72px !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
  }

  .group-top-actions .group-icon-action svg {
    width: 20px !important;
    height: 20px !important;
  }

  .group-action-plus,
  .group-action-close {
    font-size: 21px;
  }
}
/* Group action buttons */
.group-top-actions > .add-expense-button {
  background: var(--yellow) !important;
  background-color: var(--yellow) !important;
  color: #5c5130 !important;
  border: 1px solid #d6bb4f !important;
  box-shadow: none !important;
}

.group-top-actions .group-icon-action {
  gap: 9px !important;
}

.group-top-actions .group-icon-action svg {
  width: 22px !important;
  height: 22px !important;
}

.group-action-plus,
.group-action-close {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

@media (max-width: 500px) {
  .group-top-actions .group-icon-action {
    gap: 8px !important;
  }

  .group-top-actions .group-icon-action svg {
    width: 21px !important;
    height: 21px !important;
  }
}

/* Separate Add Expense from the icon actions */
.group-top-actions {
  display: flex !important;
  align-items: stretch !important;
  gap: 8px !important;
}

.group-top-actions > .add-expense-button {
  margin-right: 10px !important;
}

.group-top-actions > .group-icon-action {
  margin-left: 0 !important;
}


.group-top-actions > .add-expense-button {
  flex: 0 1 58% !important;
  width: 58% !important;
}

.group-top-actions > .group-icon-action {
  flex: 0 0 68px !important;
  width: 68px !important;
  min-width: 68px !important;
  max-width: 68px !important;
}

.group-top-actions > .add-expense-button {
  margin-right: 28px !important;
}

.group-top-actions > .group-icon-action + .group-icon-action {
  margin-left: 10px !important;
}

@media (max-width: 500px) {
  .group-top-actions > .add-expense-button {
    flex: 0 1 54% !important;
    width: 54% !important;
    margin-right: 20px !important;
  }

  .group-top-actions > .group-icon-action {
    flex-basis: 64px !important;
    width: 64px !important;
    min-width: 64px !important;
    max-width: 64px !important;
  }
}


.group-top-actions {
  display: flex !important;
  align-items: stretch !important;
  justify-content: flex-start !important;
  gap: 0 !important;
}

.group-top-actions > .add-expense-button {
  flex: 0 0 52% !important;
  width: 52% !important;
  min-width: 0 !important;
  margin-right: auto !important;
}

.group-top-actions > .group-icon-action {
  flex: 0 0 64px !important;
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
  margin-left: 0 !important;
}

.group-top-actions > .group-icon-action + .group-icon-action {
  margin-left: 6px !important;
}

@media (max-width: 500px) {
  .group-top-actions > .add-expense-button {
    flex-basis: 52% !important;
    width: 52% !important;
  }

  .group-top-actions > .group-icon-action {
    flex-basis: 60px !important;
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
  }

  .group-top-actions > .group-icon-action + .group-icon-action {
    margin-left: 5px !important;
  }
}


/* Divider between group actions and tabs */
.group-top-actions {
  position: relative;
  margin-bottom: 26px !important;
}

.group-top-actions::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 2px;
  background: #cfe7da;
  border-radius: 999px;
}


/* Group members tab */
.group-members-list {
  width: 100%;
}

.group-member-list-item {
  display: flex;
  align-items: center;
  padding: 15px 4px;
  border-bottom: 1px solid var(--border);
}

.group-member-list-item:last-child {
  border-bottom: none;
}

.group-member-list-info {
  min-width: 0;
}

.group-member-list-name {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}

.group-member-list-username {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}


.group-member-list-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 15px 4px !important;
  border-bottom: 1px solid var(--border) !important;
}

.group-member-list-name {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}

.group-member-list-username {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.group-member-list-role {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}


/* Profile account action buttons — one row */
#profileAccountSection .action-button,
#profileAccountSection .secondary-button,
#profileAccountSection button {
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  margin: 0 !important;
}

#profileAccountSection .profile-action-buttons {
  display: flex !important;
  flex-direction: row !important;
  gap: 10px !important;
  width: 100% !important;
}

@media (max-width: 500px) {
  #profileAccountSection .profile-action-buttons {
    gap: 8px !important;
  }

  #profileAccountSection .profile-action-buttons button {
    padding: 11px 6px !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }
}


/* Profile account buttons — one line */
.profile-account-actions {
  display: flex !important;
  flex-direction: row !important;
  align-items: stretch !important;
  gap: 10px !important;
  width: 100% !important;
  margin-top: 16px !important;
}

.profile-account-actions > button {
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 11px 8px !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}

@media (max-width: 500px) {
  .profile-account-actions {
    gap: 8px !important;
  }

  .profile-account-actions > button {
    font-size: 12px !important;
    padding: 10px 5px !important;
  }
}


/* Payment Option select — match input field height */
#paymentOption,
select#paymentOption {
  height: 52px !important;
  min-height: 52px !important;
  padding: 12px 14px !important;
  box-sizing: border-box !important;
  border: 2px solid var(--border) !important;
  border-radius: var(--radius-small) !important;
  background: #ffffff !important;
  color: var(--text) !important;
}


/* Compact pending payment list */
.pending-group-list {
  width: 100%;
}

.pending-payment-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border);
}

.pending-payment-list-item:last-child {
  border-bottom: none;
}

.pending-payment-info {
  flex: 1 1 auto;
  min-width: 0;
}

.pending-payment-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
}

.pending-payment-meta {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.pending-payment-notes {
  margin-top: 3px;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-payment-amount {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  white-space: nowrap;
}

.pending-payment-review-button {
  flex: 0 0 auto;
  padding: 8px 12px;
  background: var(--green-soft);
  color: var(--green);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 500px) {
  .pending-payment-list-item {
    gap: 8px;
    padding: 12px 2px;
  }

  .pending-payment-title {
    font-size: 14px;
  }

  .pending-payment-meta {
    font-size: 11px;
  }

  .pending-payment-amount {
    font-size: 13px;
  }

  .pending-payment-review-button {
    padding: 7px 9px;
    font-size: 11px;
  }
}


/* Pending tab — flat list, no cards */
#pendingPaymentsSection,
#pendingPaymentsList {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

#pendingPaymentsList .settlement-row,
#pendingPaymentsList .card {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.pending-payment-list-item {
  display: flex !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 58px !important;
  padding: 12px 4px !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.pending-payment-list-item:last-child {
  border-bottom: none !important;
}


/* Settle modal — compact shared expense list */
.settle-expense-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--border);
}

.settle-expense-list-item:last-child {
  border-bottom: none;
}

.settle-expense-info {
  flex: 1 1 auto;
  min-width: 0;
}

.settle-expense-name {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.settle-expense-date {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.settle-expense-amount {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
}


/* Settle modal — compact payment lists */
.settle-payment-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--border);
}

.settle-payment-list-item:last-child {
  border-bottom: none;
}

.settle-payment-info {
  flex: 1 1 auto;
  min-width: 0;
}

.settle-payment-name {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.settle-payment-date {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.settle-payment-amount {
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.settle-payment-status {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.settle-payment-status.confirmed {
  color: var(--green);
}

.settle-payment-status.pending {
  color: #9a8218;
}

.settle-payment-empty {
  padding: 14px 2px;
  color: var(--muted);
  font-size: 13px;
}


/* Remove nested card appearance in Settle Up modal */
.settle-payment-list-item,
.settle-expense-list-item {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}


/* Settle Up modal — flatten outstanding amount section */
.settle-amount-summary {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin-top: 16px !important;
}

.settle-amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--border);
}

.settle-amount-row:last-child {
  border-bottom: none;
}

.settle-amount-label {
  color: var(--muted);
  font-size: 14px;
}

.settle-amount-value {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}


/* Receivables modal — flat list */
.receivables-flat-list {
  width: 100%;
  margin-top: 18px;
}

.receivable-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--border);
}

.receivable-list-item:last-child {
  border-bottom: none;
}

.receivable-list-info {
  flex: 1 1 auto;
  min-width: 0;
}

.receivable-list-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.receivable-nudge-meta {
  font-size: 11px;
}

.receivable-list-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.receivable-list-actions .small-button {
  white-space: nowrap;
}

.receivables-empty {
  padding: 16px 2px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 500px) {
  .receivable-list-item {
    gap: 8px;
    padding: 13px 2px;
  }

  .receivable-list-actions {
    gap: 4px;
  }

  .receivable-list-actions .small-button {
    padding: 7px 8px;
    font-size: 11px;
  }

  .receivable-list-meta {
    font-size: 12px;
  }
}


/* Receivable Details — same flat list treatment as Payable Details */
.receivable-summary-list,
.receivable-detail-list {
  width: 100%;
  margin-top: 16px;
}

.receivable-summary-row,
.receivable-detail-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--border);
}

.receivable-summary-row:last-child,
.receivable-detail-list-item:last-child {
  border-bottom: none;
}

.receivable-summary-row strong {
  white-space: nowrap;
}

.receivable-detail-list-item > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.receivable-detail-list-item .user-name {
  font-weight: 800;
}

.receivable-detail-list-item .muted {
  margin-top: 3px;
  font-size: 12px;
}

.receivable-detail-list-item > strong,
.receivable-detail-list-item > div:last-child {
  flex-shrink: 0;
}


/* Receivable Details — same flat list treatment as Payable Details */
.receivable-summary-list,
.receivable-detail-list {
  width: 100%;
  margin-top: 16px;
}

.receivable-summary-row,
.receivable-detail-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--border);
}

.receivable-summary-row:last-child,
.receivable-detail-list-item:last-child {
  border-bottom: none;
}

.receivable-summary-row strong {
  white-space: nowrap;
}

.receivable-detail-list-item > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.receivable-detail-list-item .user-name {
  font-weight: 800;
}

.receivable-detail-list-item .muted {
  margin-top: 3px;
  font-size: 12px;
}

.receivable-detail-list-item > strong,
.receivable-detail-list-item > div:last-child {
  flex-shrink: 0;
}


/* Receivable Details — same flat list treatment as Payable Details */
.receivable-summary-list,
.receivable-detail-list {
  width: 100%;
  margin-top: 16px;
}

.receivable-summary-row,
.receivable-detail-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--border);
}

.receivable-summary-row:last-child,
.receivable-detail-list-item:last-child {
  border-bottom: none;
}

.receivable-summary-row strong {
  white-space: nowrap;
}

.receivable-detail-list-item > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.receivable-detail-list-item .user-name {
  font-weight: 800;
}

.receivable-detail-list-item .muted {
  margin-top: 3px;
  font-size: 12px;
}

.receivable-detail-list-item > strong,
.receivable-detail-list-item > div:last-child {
  flex-shrink: 0;
}


/* Receivable Details — completely flat sections */
.receivable-flat-section {
  width: 100%;
  margin-top: 16px;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

.receivable-flat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--border);
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.receivable-flat-row:last-child {
  border-bottom: none;
}

.receivable-flat-row > strong {
  white-space: nowrap;
}

.receivable-detail-row {
  align-items: flex-start !important;
}


/* Receivable Details modal — remove all nested cards */
.receivable-flat-section,
.receivable-summary-list,
.receivable-detail-list {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Any card/balance rows inside the Receivable Details modal */
.receivable-flat-section .card,
.receivable-flat-section .balance-detail-row,
.receivable-detail-list .card,
.receivable-detail-list .balance-detail-row {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Flat rows */
.receivable-flat-row,
.receivable-detail-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  padding: 13px 2px !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Remove extra spacing between individual rows */
.receivable-flat-row + .receivable-flat-row,
.receivable-detail-row + .receivable-detail-row {
  margin-top: 0 !important;
}

/* Last row */
.receivable-flat-row:last-child,
.receivable-detail-row:last-child {
  border-bottom: none !important;
}


/* One card per Receivable Details section */
.receivable-section-card {
  padding: 20px !important;
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
}

.receivable-section-list {
  width: 100%;
}

/* Rows inside the card stay flat */
.receivable-section-list .receivable-detail-row,
.receivable-section-list .receivable-flat-row,
.receivable-section-list .balance-detail-row {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 13px 2px !important;
}

.receivable-section-list > :last-child {
  border-bottom: none !important;
}


/* One card around each payment section */
.receivable-section-card {
  padding: 20px !important;
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
}

.receivable-section-list {
  width: 100%;
}

/* Flat rows inside the card */
.receivable-section-list .receivable-detail-row,
.receivable-section-list .receivable-flat-row,
.receivable-section-list .balance-detail-row {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 13px 2px !important;
}

.receivable-section-list > :last-child {
  border-bottom: none !important;
}


/* Payment Summary — no outer card */
.receivable-summary-flat {
  width: 100% !important;
  margin-top: 16px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.receivable-summary-flat .receivable-flat-row {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;
  padding: 13px 2px !important;
}

.receivable-summary-flat .receivable-flat-row:last-child {
  border-bottom: none !important;
}


/* Match Confirmed Payments spacing to Pending Payments */
.receivable-section-card .receivable-flat-row {
  padding: 13px 2px !important;
  margin: 0 !important;
}

.receivable-section-card .receivable-flat-row > div {
  margin: 0 !important;
  padding: 0 !important;
}

.receivable-section-card .receivable-flat-row .muted {
  margin-top: 3px !important;
}


/* Confirmed Payments — tighter card spacing */
.receivable-section-card .receivable-flat-row {
  padding: 8px 2px !important;
  margin: 0 !important;
  min-height: 0 !important;
}

.receivable-section-card .receivable-flat-row > div {
  margin: 0 !important;
  padding: 0 !important;
}

.receivable-section-card .receivable-flat-row .user-name {
  margin: 0 !important;
}

.receivable-section-card .receivable-flat-row .muted {
  margin-top: 2px !important;
}

@media (max-width: 500px) {
  .receivable-section-card .receivable-flat-row {
    padding: 8px 2px !important;
  }
}


/* Pull Confirmed Payment content closer to the card top */
.receivable-section-card .receivable-section-list {
  padding-top: 0 !important;
}

.receivable-section-card .receivable-flat-row {
  padding-top: 4px !important;
  padding-bottom: 8px !important;
}

.receivable-section-card .receivable-flat-row:first-child {
  padding-top: 4px !important;
}


/* Confirmed Payments card — reduce internal top whitespace */
.receivable-section-card {
  padding-top: 8px !important;
  padding-bottom: 8px !important;
}

.receivable-section-card .receivable-section-list {
  margin: 0 !important;
  padding: 0 !important;
}

.receivable-section-card .receivable-flat-row:first-child {
  padding-top: 4px !important;
  margin-top: 0 !important;
}

.receivable-section-card .receivable-flat-row:last-child {
  padding-bottom: 4px !important;
}


/* Add Expense — one card containing all participants */
.participant-list-card {
  padding: 8px 16px !important;
  margin-bottom: 20px !important;
}

.participant-list-card .participant-list {
  margin: 0 !important;
}

.participant-list-card .participant-option {
  margin: 0 !important;
  padding: 13px 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.participant-list-card .participant-option:last-child {
  border-bottom: none !important;
}


/* Compact participant list */
.participant-list-card {
  padding: 6px 16px !important;
}

.participant-list-card .participant-option {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
}

.participant-list-card .participant-option > div {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  min-width: 0 !important;
}

.participant-list-card .participant-option .user-name,
.participant-list-card .participant-option .user-handle {
  margin: 0 !important;
  padding: 0 !important;
}

.participant-list-card .participant-option .user-name {
  font-weight: 800 !important;
}

.participant-list-card .participant-option .user-handle {
  color: var(--muted) !important;
  font-size: 13px !important;
}

.participant-list-card .participant-option .user-handle::before {
  content: "·";
  margin-right: 6px;
  color: var(--muted);
}


/* Custom split — one card, flat member rows */
.custom-split-list-card {
  padding: 6px 16px !important;
}

.custom-split-list {
  width: 100%;
}

.custom-split-list-card .custom-split-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 12px 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.custom-split-list-card .custom-split-row:last-child {
  border-bottom: none !important;
}

.custom-split-member {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  min-width: 0 !important;
}

.custom-split-member .user-name,
.custom-split-member .user-handle {
  margin: 0 !important;
  padding: 0 !important;
}

.custom-split-member .user-handle::before {
  content: "·";
  margin-right: 5px;
}

.custom-split-amount {
  flex: 0 0 135px !important;
  width: 135px !important;
  margin: 0 !important;
}

@media (max-width: 500px) {
  .custom-split-list-card {
    padding: 5px 14px !important;
  }

  .custom-split-list-card .custom-split-row {
    padding: 10px 0 !important;
  }

  .custom-split-amount {
    flex-basis: 120px !important;
    width: 120px !important;
  }
}


/* Custom split rows — flat list */
#expenseSplitEditor {
  width: 100%;
}

#expenseSplitEditor .expense-share-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 12px 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#expenseSplitEditor .expense-share-row:last-child {
  border-bottom: none !important;
}

#expenseSplitEditor .expense-share-row > div:first-child {
  display: flex !important;
  align-items: center !important;
  gap: 5px !important;
  min-width: 0 !important;
}

#expenseSplitEditor .expense-share-row .user-name,
#expenseSplitEditor .expense-share-row .user-handle {
  margin: 0 !important;
  padding: 0 !important;
}

#expenseSplitEditor .expense-share-row .user-handle::before {
  content: "·";
  margin-right: 5px;
}

#expenseSplitEditor .expense-share-input-wrap {
  flex: 0 0 135px !important;
  width: 135px !important;
  margin: 0 !important;
}

@media (max-width: 500px) {
  #expenseSplitEditor .expense-share-row {
    padding: 10px 0 !important;
  }

  #expenseSplitEditor .expense-share-input-wrap {
    flex-basis: 120px !important;
    width: 120px !important;
  }
}


/* Indent custom split member names */
#expenseSplitEditor .expense-share-row > div:first-child {
  padding-left: 14px !important;
}

@media (max-width: 500px) {
  #expenseSplitEditor .expense-share-row > div:first-child {
    padding-left: 12px !important;
  }
}


/* Groups page — divider between Create Group and tabs */
.groups-page-create-section {
  position: relative;
  margin-bottom: 28px !important;
}

.groups-page-create-section::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: -14px;
  height: 2px;
  background: #cfe7da;
  border-radius: 999px;
}


/* =========================================================
   OweMe Soft Green / Modern Finance Theme
   Reference-inspired visual layer
   ========================================================= */

:root {
  --bg: #f5f7f1;
  --card: #ffffff;
  --card-soft: #f0f5eb;

  --text: #193a27;
  --muted: #718074;
  --border: #e4ebe0;

  --primary: #b9dcb3;
  --primary-dark: #1b4a2c;
  --primary-soft: #e5f1df;

  --yellow: #f3d66b;
  --yellow-soft: #fff7d8;

  --green: #8fbd8a;
  --green-soft: #e8f3e4;

  --red: #d98282;
  --red-soft: #fceceb;

  --orange: #d9a064;
  --orange-soft: #fff1df;

  --shadow: 0 10px 30px rgba(40, 67, 47, 0.07);
  --shadow-hover: 0 14px 36px rgba(40, 67, 47, 0.11);

  --radius: 28px;
  --radius-small: 18px;
}

/* ---------- Base ---------- */

html,
body {
  background: #f5f7f1;
}

body {
  color: var(--text);
  font-family:
    "Nunito",
    "Trebuchet MS",
    "Segoe UI",
    Arial,
    sans-serif;
  background:
    radial-gradient(
      circle at 12% 5%,
      rgba(207, 229, 198, 0.42),
      transparent 27%
    ),
    radial-gradient(
      circle at 90% 15%,
      rgba(228, 239, 218, 0.55),
      transparent 30%
    ),
    #f5f7f1;
}

/* ---------- Typography ---------- */

h1,
h2,
h3,
h4,
h5,
strong,
.user-name {
  color: #193a27;
}

h1,
h2,
h3 {
  letter-spacing: -0.6px;
}

.muted {
  color: #718074 !important;
}

/* ---------- Main cards ---------- */

.card,
.auth-card,
.modal-card,
.balance-detail-row,
.group-card,
.history-card,
.payment-card,
.invitation-card,
.contact-card {
  border-color: transparent;
  box-shadow: var(--shadow);
}

.card,
.group-card,
.history-card,
.payment-card,
.invitation-card,
.contact-card {
  background: #ffffff;
  border-radius: 28px;
}

.card:hover,
.group-card:hover,
.history-card:hover {
  box-shadow: var(--shadow-hover);
}

/* ---------- Inputs ---------- */

input,
select,
textarea {
  background: #ffffff;
  border: 1.5px solid #e0e9dc;
  border-radius: 18px;
  min-height: 50px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #9fc89a;
  box-shadow: 0 0 0 4px rgba(185, 220, 179, 0.28);
}

/* ---------- Buttons ---------- */

.button,
button.button {
  min-height: 48px;
  border-radius: 999px;
  border: none;
  font-weight: 800;
  box-shadow: none;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.button:hover,
button.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(35, 68, 43, 0.09);
}

.button:active,
button.button:active {
  transform: translateY(0);
}

/* Primary green */

.primary-button,
.success-button {
  background: #1b4a2c !important;
  color: #ffffff !important;
}

/* OweMe's main action stays yellow */

.add-expense-button {
  background: #f3d66b !important;
  color: #193a27 !important;
  font-weight: 900;
}

/* Secondary */

.secondary-button {
  background: #e5f1df !important;
  color: #285236 !important;
}

/* Danger */

.danger-button {
  background: #f8e2e0 !important;
  color: #9a4848 !important;
}

/* Small buttons */

.small-button {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 999px;
  border: none;
  background: #e8f2e4;
  color: #285236;
  font-weight: 800;
}

/* ---------- Button rows ---------- */

.button-row {
  gap: 10px;
}

/* ---------- Header ---------- */

.header {
  background: rgba(245, 247, 241, 0.94);
  border-bottom: 1px solid rgba(216, 228, 213, 0.75);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

/* Header action buttons */

.header-action-button {
  border-radius: 50%;
  background: #ffffff;
  color: #193a27;
  border: none;
  box-shadow: 0 5px 18px rgba(35, 68, 43, 0.08);
}

/* ---------- Bottom navigation ---------- */

.bottom-nav {
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e6ece2;
  box-shadow: 0 -8px 25px rgba(35, 68, 43, 0.06);
  backdrop-filter: blur(16px);
}

.bottom-nav button {
  color: #7b887d;
  border-radius: 18px;
}

.bottom-nav button.active,
.bottom-nav button:hover {
  color: #1b4a2c;
  background: #e7f1e2;
}

/* ---------- Tabs ---------- */

.history-tabs {
  background: #eaf1e6;
  border-radius: 999px;
  padding: 4px;
  border: none;
}

.history-tab {
  border-radius: 999px !important;
  color: #6e7e70;
  border: none !important;
  background: transparent;
  font-weight: 800;
}

.history-tab.active {
  background: #ffffff !important;
  color: #193a27 !important;
  box-shadow: 0 4px 12px rgba(35, 68, 43, 0.07);
}

/* ---------- Soft section dividers ---------- */

.group-actions-divider,
.section-divider {
  border-color: #dce8d8 !important;
}

/* ---------- Balance / summary cards ---------- */

.balance-card,
.balance-summary,
.summary-card {
  background:
    linear-gradient(
      145deg,
      #eaf4e4 0%,
      #dcefd7 100%
    );
  border: none;
  border-radius: 30px;
  box-shadow: none;
}

/* Large amounts */

.balance-amount,
.summary-amount {
  color: #193a27;
  font-weight: 900;
  letter-spacing: -1px;
}

/* ---------- Detail rows ---------- */

.balance-detail-list {
  gap: 12px;
}

.balance-detail-row {
  background: #ffffff;
  border-radius: 24px;
  border: none;
  padding: 18px;
}

/* ---------- Modal ---------- */

.modal-backdrop {
  background: rgba(28, 52, 35, 0.28);
  backdrop-filter: blur(5px);
}

.modal {
  background: transparent;
}

.modal-card {
  background: #ffffff;
  border: none;
  border-radius: 30px;
  box-shadow: 0 20px 55px rgba(30, 55, 37, 0.16);
}

.modal-card h2,
.modal-card h3 {
  color: #193a27;
}

/* Close button */

.modal-close {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #edf4e9;
  color: #285236;
  border: none;
}

/* ---------- Checkboxes / radio controls ---------- */

input[type="checkbox"],
input[type="radio"] {
  accent-color: #1b4a2c;
}

/* ---------- Links ---------- */

a {
  color: #28603a;
}

/* ---------- Green status ---------- */

.status-success,
.success,
.accepted {
  color: #2d7040;
}

/* ---------- Payment / positive states ---------- */

.payment-success,
.payment-confirmed {
  background: #e7f2e3;
  border-color: transparent;
}

/* ---------- Group cards ---------- */

.group-card {
  padding: 22px;
}

/* Group titles */

.group-card h3,
.group-card .group-name {
  color: #193a27;
  font-weight: 900;
}

/* ---------- Icons ---------- */

.icon-button,
.card-icon,
.action-icon {
  border-radius: 50%;
}

/* ---------- Auth ---------- */

.auth-card {
  background: #ffffff;
  border: none;
  border-radius: 32px;
  box-shadow: 0 14px 40px rgba(35, 68, 43, 0.08);
}

.brand-icon {
  background: #e5f1df;
  border: none;
  box-shadow: none;
}

/* ---------- Mobile breathing room ---------- */

#content {
  padding-left: 16px;
  padding-right: 16px;
}

/* ---------- Remove harsh borders from common UI ---------- */

.card,
.group-card,
.history-card,
.balance-detail-row,
.payment-card,
.invitation-card,
.contact-card,
.modal-card {
  border-width: 0;
}

/* ---------- Soft pill labels ---------- */

.badge,
.status-badge,
.chip,
.tag {
  border-radius: 999px;
}

/* ---------- Scrollbars ---------- */

::-webkit-scrollbar {
  width: 7px;
}

::-webkit-scrollbar-thumb {
  background: #cbdcc7;
  border-radius: 999px;
}

::-webkit-scrollbar-track {
  background: transparent;
}


/* =========================================================
   OweMe Soft UI — Stage 2
   Cards / Buttons / Navigation / Forms
========================================================= */

/* ---------- Main content spacing ---------- */

#content {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Cards: softer + more sculpted ---------- */

.card,
.group-card,
.history-card,
.payment-card,
.invitation-card,
.contact-card,
.balance-detail-row {
  position: relative;
  overflow: hidden;
  border-radius: 30px !important;
  background: #ffffff !important;
  box-shadow:
    0 5px 18px rgba(39, 66, 45, 0.045),
    0 16px 35px rgba(39, 66, 45, 0.035) !important;
}

/* subtle green wash */

.card::before,
.group-card::before,
.history-card::before,
.payment-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(214, 235, 207, 0.34),
      transparent 34%
    );
  pointer-events: none;
}

/* Keep card contents above decoration */

.card > *,
.group-card > *,
.history-card > *,
.payment-card > * {
  position: relative;
  z-index: 1;
}

/* ---------- Group cards ---------- */

.group-card {
  padding: 22px !important;
  min-height: 150px;
}

.group-card:hover {
  transform: translateY(-2px);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

/* ---------- Primary buttons ---------- */

.button,
button.button,
.primary-button,
.success-button,
.secondary-button,
.danger-button,
.add-expense-button {
  min-height: 50px;
  padding: 12px 20px;
  border-radius: 999px !important;
  font-size: 14px;
  letter-spacing: -0.1px;
}

/* Main green */

.primary-button,
.success-button {
  background: #1b4a2c !important;
  color: #ffffff !important;
}

/* Main OweMe yellow */

.add-expense-button {
  background: #f3d66b !important;
  color: #193a27 !important;
  box-shadow:
    0 5px 14px rgba(198, 167, 65, 0.16);
}

/* Secondary */

.secondary-button {
  background: #e8f2e3 !important;
  color: #285236 !important;
}

/* Danger */

.danger-button {
  background: #f8e4e2 !important;
  color: #964b4b !important;
}

/* ---------- Compact action buttons ---------- */

.small-button {
  min-height: 40px;
  padding: 8px 15px !important;
  border-radius: 999px !important;
  background: #edf4e9 !important;
  color: #285236 !important;
  border: none !important;
  font-weight: 800;
}

/* ---------- Icon buttons ---------- */

.icon-button,
.header-action-button,
.modal-close {
  border-radius: 50% !important;
  border: none !important;
}

/* ---------- Inputs ---------- */

input,
select,
textarea {
  min-height: 52px;
  padding: 13px 17px;
  border-radius: 18px !important;
  background: #fbfcfa !important;
  border: 1.5px solid #e0e9dc !important;
}

textarea {
  min-height: 105px;
}

input:focus,
select:focus,
textarea:focus {
  background: #ffffff !important;
  border-color: #9fc89a !important;
  box-shadow:
    0 0 0 4px rgba(185, 220, 179, 0.24) !important;
}

/* ---------- Tabs ---------- */

.history-tabs {
  display: flex;
  width: 100%;
  padding: 5px !important;
  gap: 4px;
  border-radius: 999px !important;
  background: #e7efe3 !important;
}

.history-tab {
  flex: 1;
  min-height: 43px;
  padding: 9px 14px !important;
  border: none !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #718074 !important;
  font-weight: 800;
}

.history-tab.active {
  background: #ffffff !important;
  color: #193a27 !important;
  box-shadow:
    0 3px 10px rgba(39, 66, 45, 0.07);
}

/* ---------- Bottom navigation ---------- */

.bottom-nav {
  height: var(--nav-height);
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.97) !important;
  border-top: 0 !important;
  box-shadow:
    0 -8px 28px rgba(39, 66, 45, 0.055) !important;
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  min-width: 58px;
  min-height: 56px;
  padding: 5px 9px;
  border-radius: 20px !important;
  background: transparent !important;
  color: #7a887c !important;
  border: none !important;
  font-weight: 700;
}

.bottom-nav button.active {
  background: #e6f1e1 !important;
  color: #1b4a2c !important;
}

/* ---------- Header ---------- */

.header {
  min-height: 70px;
  background: rgba(245, 247, 241, 0.92) !important;
  border-bottom: 1px solid #e3ebe0 !important;
  box-shadow: none !important;
  backdrop-filter: blur(18px);
}

.header-action-button {
  width: 42px;
  height: 42px;
  background: #ffffff !important;
  color: #193a27 !important;
  box-shadow:
    0 5px 16px rgba(39, 66, 45, 0.07);
}

/* ---------- Modal ---------- */

.modal-backdrop {
  background: rgba(25, 48, 32, 0.25) !important;
  backdrop-filter: blur(7px);
}

.modal-card {
  max-width: 560px;
  border-radius: 32px !important;
  padding: 25px !important;
  background: #ffffff !important;
  box-shadow:
    0 24px 70px rgba(25, 48, 32, 0.17) !important;
}

/* ---------- Modal section cards ---------- */

.modal-card .card,
.modal-card .balance-detail-row {
  border-radius: 23px !important;
  box-shadow: none !important;
  background: #f5f8f3 !important;
}

/* ---------- Checkbox rows ---------- */

.participant-row,
.expense-participant-row,
.member-row,
.pending-payment-list-item {
  border-radius: 18px;
}

/* ---------- Expense participant inputs ---------- */

.participant-checkbox + label {
  border-radius: 18px;
}

/* ---------- Status pills ---------- */

.status-badge,
.badge,
.chip,
.tag {
  border-radius: 999px !important;
  padding: 5px 11px;
}

/* ---------- Money emphasis ---------- */

.amount,
.balance-amount,
.summary-amount,
.payment-amount,
.group-amount {
  color: #193a27;
  font-weight: 900;
}

/* ---------- Dividers ---------- */

hr,
.divider {
  border-color: #e4ece0 !important;
}

/* ---------- Empty states ---------- */

.empty-state {
  background: #edf4e9;
  border-radius: 28px;
  padding: 28px 20px;
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {

  #content {
    padding-left: 14px;
    padding-right: 14px;
  }

  .card,
  .group-card,
  .history-card,
  .payment-card,
  .invitation-card,
  .contact-card {
    border-radius: 26px !important;
  }

  .modal-card {
    border-radius: 28px !important;
    padding: 20px !important;
  }

  .button,
  button.button {
    min-height: 50px;
  }

}


/* =========================================================
   OweMe Soft UI — Stage 3
   HOME / BALANCE HERO
========================================================= */

/* ---------- Home balance area ---------- */

.home-balance,
.balance-summary,
.balance-card,
.home-summary {
  border-radius: 32px !important;
}

/* Main balance card */

.balance-summary,
.balance-card,
.home-balance {
  background:
    linear-gradient(
      145deg,
      #edf6e9 0%,
      #e4f0df 55%,
      #f5f8ef 100%
    ) !important;

  border: 1px solid rgba(185, 220, 179, 0.55) !important;

  box-shadow:
    0 10px 30px rgba(54, 91, 61, 0.08),
    0 2px 6px rgba(54, 91, 61, 0.04) !important;

  padding: 26px !important;
}

/* Balance title */

.balance-summary h1,
.balance-summary h2,
.balance-card h1,
.balance-card h2,
.home-balance h1,
.home-balance h2 {
  color: #193a27 !important;
  letter-spacing: -1px;
}

/* Big balance number */

.balance-summary .amount,
.balance-summary .balance-amount,
.balance-card .amount,
.balance-card .balance-amount,
.home-balance .amount,
.home-balance .balance-amount {
  font-size: clamp(32px, 8vw, 46px) !important;
  line-height: 1 !important;
  letter-spacing: -2px;
  font-weight: 900 !important;
  color: #193a27 !important;
}

/* ---------- Owe / Owed cards ---------- */

.balance-summary .summary-grid,
.balance-card .summary-grid,
.home-summary-grid {
  gap: 12px;
}

.balance-summary .summary-item,
.balance-card .summary-item,
.home-summary-item {
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid rgba(255, 255, 255, 0.8) !important;
  border-radius: 23px !important;
  padding: 17px !important;
  box-shadow: none !important;
}

/* Owe */

.balance-summary .payable,
.balance-card .payable,
.home-summary-item.payable {
  color: #9a5a54 !important;
}

/* Owed */

.balance-summary .receivable,
.balance-card .receivable,
.home-summary-item.receivable {
  color: #39724a !important;
}

/* ---------- Home section titles ---------- */

#home h2,
#home h3,
.home-section-title {
  color: #193a27 !important;
  font-weight: 900;
  letter-spacing: -0.5px;
}

/* ---------- Section spacing ---------- */

#home > section,
.home-section {
  margin-bottom: 22px;
}

/* ---------- Quick action area ---------- */

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.quick-actions button {
  min-height: 58px;
  border-radius: 22px !important;
  border: 1px solid #e2ebe0 !important;
  background: #ffffff !important;
  color: #285236 !important;
  box-shadow:
    0 5px 18px rgba(39, 66, 45, 0.045) !important;
}

/* Primary quick action */

.quick-actions button.primary,
.quick-actions .primary-button {
  background: #1b4a2c !important;
  color: #ffffff !important;
  border-color: #1b4a2c !important;
}

/* ---------- Recent activity ---------- */

.recent-activity,
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.activity-item,
.recent-activity-item {
  min-height: 66px;
  padding: 13px 15px !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  border: 1px solid #e7eee4 !important;
  box-shadow: none !important;
}

/* ---------- Home group preview ---------- */

.home-group-card {
  border-radius: 25px !important;
  background: #ffffff !important;
  border: 1px solid #e5ece2 !important;
  padding: 18px !important;
  box-shadow:
    0 5px 18px rgba(39, 66, 45, 0.045) !important;
}

.home-group-card:hover {
  transform: translateY(-1px);
}

/* ---------- Create group ---------- */

#createGroupButton,
.create-group-button {
  border-radius: 999px !important;
  min-height: 52px;
  background: #ffffff !important;
  color: #285236 !important;
  border: 1.5px solid #dce8d9 !important;
  box-shadow: 0 5px 18px rgba(39, 66, 45, 0.045);
}

/* ---------- Add Expense floating emphasis ---------- */

#addExpenseButton,
.add-expense-button {
  min-height: 54px;
  border-radius: 999px !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  font-weight: 900 !important;
}

/* ---------- Home mobile ---------- */

@media (max-width: 600px) {

  .balance-summary,
  .balance-card,
  .home-balance {
    padding: 22px !important;
    border-radius: 28px !important;
  }

  .balance-summary .amount,
  .balance-summary .balance-amount,
  .balance-card .amount,
  .balance-card .balance-amount,
  .home-balance .amount,
  .home-balance .balance-amount {
    font-size: 36px !important;
  }

  .quick-actions {
    gap: 10px;
  }

  .quick-actions button {
    min-height: 54px;
    border-radius: 19px !important;
  }

}


/* =========================================================
   OweMe Soft UI — Stage 4
   GROUPS + GROUP DETAIL
========================================================= */

/* ---------- Groups page ---------- */

#groups {
  padding-bottom: 20px;
}

/* Group page heading */

#groups h1,
#groups h2,
.groups-title {
  color: #193a27 !important;
  font-weight: 900;
  letter-spacing: -1px;
}

/* ---------- Group list ---------- */

.groups-list,
.group-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- Group cards ---------- */

.group-card {
  min-height: 154px !important;
  padding: 21px 20px !important;
  border: 1px solid #e5ece2 !important;
  background: #ffffff !important;
}

/* Group name */

.group-card .group-name,
.group-card h3,
.group-card h4 {
  color: #193a27 !important;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.4px;
}

/* Member count */

.group-card .member-count,
.group-card .group-members,
.group-card .members-count {
  color: #819087 !important;
  font-size: 12px;
  font-weight: 700;
}

/* ---------- Group financial information ---------- */

.group-card .group-stats,
.group-card .financial-summary,
.group-card .group-summary {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

/* Individual financial stat */

.group-card .stat,
.group-card .group-stat,
.group-card .financial-stat {
  padding: 12px 13px !important;
  border-radius: 18px !important;
  background: #f4f7f1 !important;
  border: none !important;
}

/* Stat labels */

.group-card .stat-label,
.group-card .financial-label {
  color: #7a887c !important;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .35px;
}

/* Stat values */

.group-card .stat-value,
.group-card .financial-value {
  margin-top: 3px;
  color: #193a27 !important;
  font-size: 15px;
  font-weight: 900;
}

/* ---------- Payable / receivable colors ---------- */

.group-card .payable,
.group-card .your-payables {
  color: #9b5b55 !important;
}

.group-card .receivable,
.group-card .your-receivables {
  color: #39744b !important;
}

/* ---------- Group page header ---------- */

.group-header {
  padding: 4px 0 20px;
}

.group-header h1,
.group-header h2 {
  color: #193a27 !important;
  font-weight: 900;
  letter-spacing: -1px;
}

/* ---------- Group actions ---------- */

.group-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

/* Add expense */

.group-actions .add-expense-button,
.group-actions #addExpenseButton {
  flex: 1;
  min-height: 52px;
}

/* Icon-only actions */

.group-actions .icon-button,
.group-actions .header-action-button {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  padding: 0 !important;
  background: #edf4e9 !important;
  color: #285236 !important;
  border: none !important;
}

/* Close group */

.group-actions .danger-button {
  background: #f8e5e3 !important;
  color: #984f4b !important;
}

/* ---------- Green divider ---------- */

.group-actions + .history-tabs,
.group-actions + .tabs {
  position: relative;
  margin-top: 8px;
  padding-top: 14px !important;
}

.group-actions + .history-tabs::before,
.group-actions + .tabs::before {
  content: "";
  position: absolute;
  top: 0;
  left: 4px;
  right: 4px;
  height: 2px;
  border-radius: 99px;
  background: #d6e8d1;
}

/* ---------- Group tabs ---------- */

#groupDetail .history-tabs,
.group-detail .history-tabs {
  margin-bottom: 4px;
}

/* ---------- Settlement rows ---------- */

.settlement-item,
.settlement-row,
.history-item {
  min-height: 72px;
  padding: 14px 16px !important;
  margin-bottom: 9px;
  border-radius: 21px !important;
  background: #ffffff !important;
  border: 1px solid #e7eee4 !important;
  box-shadow: none !important;
}

/* ---------- Pending payments ---------- */

.pending-payment-list-item {
  min-height: 70px;
  padding: 13px 15px !important;
  margin-bottom: 9px;
  border: 1px solid #e5ece2 !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

/* Pending title */

.pending-payment-title {
  color: #193a27 !important;
  font-weight: 850;
}

/* Pending metadata */

.pending-payment-meta {
  color: #7b887d !important;
  font-size: 12px;
}

/* Pending amount */

.pending-payment-amount {
  color: #39744b !important;
  font-weight: 900;
}

/* ---------- Members ---------- */

.member-row,
.group-member-row {
  min-height: 64px;
  padding: 12px 14px !important;
  margin-bottom: 8px;
  border-radius: 19px !important;
  background: #ffffff !important;
  border: 1px solid #e6ede4 !important;
}

/* Avatar / initial */

.member-avatar,
.group-member-avatar {
  background: #e5f1df !important;
  color: #285236 !important;
}

/* Username */

.member-username,
.group-member-username {
  color: #193a27 !important;
  font-weight: 850;
}

/* Display name */

.member-name,
.group-member-name {
  color: #7a887c !important;
}

/* Role */

.member-role,
.group-member-role {
  color: #5c8968 !important;
  background: #edf5e9 !important;
  border-radius: 999px !important;
  padding: 4px 9px !important;
  font-size: 10px;
  font-weight: 800;
}

/* ---------- Group history ---------- */

.history-card,
.history-item {
  border-radius: 21px !important;
}

/* ---------- Eye / edit / delete actions ---------- */

.history-card button,
.history-item button,
.payment-card button {
  border-radius: 14px !important;
  border: none !important;
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {

  .group-card {
    min-height: 148px !important;
    padding: 18px !important;
    border-radius: 26px !important;
  }

  .group-card .group-stats,
  .group-card .financial-summary,
  .group-card .group-summary {
    gap: 7px;
  }

  .group-card .stat,
  .group-card .group-stat,
  .group-card .financial-stat {
    padding: 10px !important;
    border-radius: 16px !important;
  }

  .group-actions {
    gap: 8px;
  }

  .group-actions .icon-button,
  .group-actions .header-action-button {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
  }

}


/* =========================================================
   OweMe Soft UI — Stage 5
   EXPENSE / SETTLEMENT / PAYMENT MODALS
========================================================= */

/* ---------- Modal shell ---------- */

.modal {
  background: rgba(25, 48, 32, 0.24) !important;
  backdrop-filter: blur(8px);
}

.modal-content,
.modal-card,
.modal-dialog {
  background: #ffffff !important;
  border: 1px solid rgba(255,255,255,.8) !important;
  border-radius: 32px !important;
  box-shadow:
    0 25px 75px rgba(25, 48, 32, .16) !important;
}

/* ---------- Modal header ---------- */

.modal-header {
  padding: 20px 22px 15px !important;
  border-bottom: 1px solid #edf1eb !important;
}

.modal-header h2,
.modal-header h3,
.modal-title {
  color: #193a27 !important;
  font-weight: 900 !important;
  letter-spacing: -.7px;
}

/* ---------- Close button ---------- */

.modal-close,
.modal-header .close,
button.close {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  border-radius: 50% !important;
  background: #edf4e9 !important;
  color: #285236 !important;
  border: none !important;
  font-size: 20px !important;
}

/* ---------- Modal body ---------- */

.modal-body {
  padding: 20px 22px !important;
}

/* ---------- Form labels ---------- */

.modal label {
  color: #4c6253 !important;
  font-size: 12px !important;
  font-weight: 850 !important;
  letter-spacing: .1px;
}

/* ---------- Amount field ---------- */

.modal input[type="number"] {
  font-size: 22px !important;
  font-weight: 900 !important;
  color: #193a27 !important;
}

/* ---------- Amount input wrapper ---------- */

.amount-input-wrapper,
.expense-amount-wrapper {
  position: relative;
}

.amount-input-wrapper input,
.expense-amount-wrapper input {
  background: #f4f8f1 !important;
  border: 1px solid #dfe9db !important;
  border-radius: 21px !important;
}

/* ---------- Section cards ---------- */

.modal-section,
.form-section,
.expense-section,
.payment-section {
  background: #f5f8f3 !important;
  border-radius: 23px !important;
  padding: 16px !important;
  border: none !important;
}

/* ---------- Section titles ---------- */

.modal-section-title,
.form-section-title,
.expense-section-title {
  color: #193a27 !important;
  font-size: 14px;
  font-weight: 900;
}

/* ---------- Participant rows ---------- */

.participant-row,
.expense-participant-row,
.split-row {
  min-height: 56px;
  padding: 10px 12px !important;
  background: transparent !important;
  border: none !important;
}

/* selected participant */

.participant-row.selected,
.expense-participant-row.selected,
.split-row.selected {
  background: #e8f2e3 !important;
  border-radius: 16px !important;
}

/* ---------- Custom split rows ---------- */

.custom-split-row,
.split-amount-row {
  min-height: 57px;
  padding: 9px 11px !important;
  border-bottom: 1px solid #e1e9de !important;
}

.custom-split-row:last-child,
.split-amount-row:last-child {
  border-bottom: none !important;
}

/* ---------- Split amount input ---------- */

.custom-split-row input,
.split-amount-row input {
  width: 105px;
  min-height: 43px !important;
  padding: 8px 11px !important;
  text-align: right;
  border-radius: 14px !important;
  background: #ffffff !important;
}

/* ---------- Payment option ---------- */

.modal select {
  height: 52px !important;
  min-height: 52px !important;
  border-radius: 18px !important;
  background: #fbfcfa !important;
}

/* ---------- Notes ---------- */

.modal textarea {
  border-radius: 18px !important;
  resize: vertical;
}

/* ---------- Primary modal action ---------- */

.modal .primary-button,
.modal .success-button,
.modal button[type="submit"] {
  min-height: 53px;
  border-radius: 999px !important;
  font-weight: 900 !important;
}

/* ---------- Secondary modal action ---------- */

.modal .secondary-button {
  min-height: 53px;
  border-radius: 999px !important;
}

/* ---------- Payment review ---------- */

.payment-review-card,
.review-payment-card {
  background: #f5f8f3 !important;
  border-radius: 24px !important;
  padding: 17px !important;
  border: none !important;
}

/* payment details */

.payment-detail-row,
.review-payment-row {
  min-height: 43px;
  padding: 8px 0 !important;
  border-bottom: 1px solid #e2e9df !important;
}

.payment-detail-row:last-child,
.review-payment-row:last-child {
  border-bottom: none !important;
}

/* ---------- Payment actions ---------- */

.payment-review-actions {
  display: flex !important;
  gap: 10px !important;
  margin-top: 18px;
}

.payment-review-actions button {
  flex: 1 !important;
  min-height: 50px !important;
  border-radius: 999px !important;
  font-weight: 900 !important;
}

/* ---------- Settlement summary ---------- */

.settlement-summary,
.payment-summary {
  background:
    linear-gradient(
      145deg,
      #edf6e9,
      #f5f8f1
    ) !important;
  border-radius: 25px !important;
  padding: 18px !important;
  border: 1px solid #e2ecdf !important;
}

/* ---------- Settlement amount ---------- */

.settlement-summary .amount,
.payment-summary .amount,
.settlement-amount {
  color: #193a27 !important;
  font-size: 28px !important;
  font-weight: 900 !important;
  letter-spacing: -1px;
}

/* ---------- Expense / payment list rows ---------- */

.expense-row,
.payment-row,
.confirmed-payment-row,
.pending-payment-row {
  min-height: 58px;
  padding: 10px 3px !important;
  border-bottom: 1px solid #e3eade !important;
}

.expense-row:last-child,
.payment-row:last-child,
.confirmed-payment-row:last-child,
.pending-payment-row:last-child {
  border-bottom: none !important;
}

/* ---------- Confirmation dialog ---------- */

.confirmation-modal,
.confirm-modal {
  border-radius: 30px !important;
  padding: 25px !important;
  background: #ffffff !important;
}

.confirmation-modal h2,
.confirmation-modal h3,
.confirm-modal h2,
.confirm-modal h3 {
  color: #193a27 !important;
  font-weight: 900 !important;
}

/* ---------- Delete / destructive action ---------- */

.confirmation-modal .danger-button,
.confirm-modal .danger-button {
  background: #f8e4e2 !important;
  color: #984f4b !important;
}

/* ---------- Modal mobile ---------- */

@media (max-width: 600px) {

  .modal-content,
  .modal-card,
  .modal-dialog {
    border-radius: 28px 28px 0 0 !important;
  }

  .modal-header {
    padding: 17px 18px 13px !important;
  }

  .modal-body {
    padding: 17px 18px !important;
  }

  .modal-section,
  .form-section,
  .expense-section,
  .payment-section {
    border-radius: 20px !important;
    padding: 14px !important;
  }

  .payment-review-actions {
    gap: 8px !important;
  }

}


/* =========================================================
   OweMe Soft UI — Stage 6
   INVITES / CONTACTS / PROFILE / SETTINGS
========================================================= */

/* ---------- Page headings ---------- */

#invites h1,
#invites h2,
#contacts h1,
#contacts h2,
#profile h1,
#profile h2,
#settings h1,
#settings h2 {
  color: #193a27 !important;
  font-weight: 900 !important;
  letter-spacing: -1px;
}

/* ---------- List containers ---------- */

.invites-list,
.invitation-list,
.contacts-list,
.profile-list,
.settings-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* ---------- Invitation rows ---------- */

.invitation-item,
.invitation-card,
.invite-item {
  min-height: 68px;
  padding: 13px 15px !important;
  border-radius: 21px !important;
  background: #ffffff !important;
  border: 1px solid #e5ece2 !important;
  box-shadow: 0 5px 16px rgba(39, 66, 45, .035) !important;
}

/* ---------- Invitation status ---------- */

.invitation-status,
.invite-status {
  border-radius: 999px !important;
  padding: 5px 10px !important;
  font-size: 10px !important;
  font-weight: 850 !important;
}

.invitation-status.pending,
.invite-status.pending {
  background: #fff5d6 !important;
  color: #8a6a21 !important;
}

.invitation-status.accepted,
.invite-status.accepted {
  background: #e5f3e3 !important;
  color: #39744b !important;
}

.invitation-status.declined,
.invite-status.declined {
  background: #f8e5e3 !important;
  color: #984f4b !important;
}

/* ---------- Invite accept / decline ---------- */

.invite-actions,
.invitation-actions {
  display: flex;
  gap: 7px;
}

.invite-actions button,
.invitation-actions button {
  width: 38px;
  height: 38px;
  min-height: 38px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: none !important;
}

.invite-actions .accept,
.invitation-actions .accept {
  background: #e5f3e3 !important;
  color: #39744b !important;
}

.invite-actions .decline,
.invitation-actions .decline {
  background: #f8e5e3 !important;
  color: #984f4b !important;
}

/* ---------- Contacts ---------- */

.contact-item,
.contact-card {
  min-height: 67px;
  padding: 12px 15px !important;
  border-radius: 21px !important;
  background: #ffffff !important;
  border: 1px solid #e5ece2 !important;
  box-shadow: 0 5px 16px rgba(39, 66, 45, .035) !important;
}

/* Contact avatar */

.contact-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50% !important;
  background: #e6f1e1 !important;
  color: #285236 !important;
  font-weight: 900;
}

/* Contact username */

.contact-username {
  color: #193a27 !important;
  font-weight: 850 !important;
}

/* Contact metadata */

.contact-meta {
  color: #7b887d !important;
  font-size: 11px !important;
}

/* ---------- Profile hero ---------- */

.profile-header,
.profile-hero,
.account-header {
  background:
    linear-gradient(
      145deg,
      #edf6e9,
      #f7f8f2
    ) !important;
  border-radius: 30px !important;
  padding: 24px !important;
  border: 1px solid #e0eadc !important;
  box-shadow: 0 9px 25px rgba(39, 66, 45, .055) !important;
}

/* Profile avatar */

.profile-avatar,
.account-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50% !important;
  background: #d9eacf !important;
  color: #285236 !important;
  font-size: 25px !important;
  font-weight: 900 !important;
}

/* Profile name */

.profile-name,
.account-name {
  color: #193a27 !important;
  font-size: 21px !important;
  font-weight: 900 !important;
}

/* Username */

.profile-username,
.account-username {
  color: #748178 !important;
  font-size: 13px !important;
}

/* ---------- Profile buttons ---------- */

.profile-actions,
.account-actions {
  display: flex !important;
  gap: 9px !important;
}

.profile-actions button,
.account-actions button {
  flex: 1 !important;
  min-height: 48px !important;
  border-radius: 999px !important;
  font-weight: 850 !important;
}

/* ---------- Settings rows ---------- */

.settings-item,
.setting-row,
.account-setting-row {
  min-height: 61px;
  padding: 13px 15px !important;
  border-radius: 20px !important;
  background: #ffffff !important;
  border: 1px solid #e5ece2 !important;
  box-shadow: none !important;
}

/* Settings title */

.settings-item .title,
.setting-row .title,
.account-setting-row .title {
  color: #193a27 !important;
  font-weight: 850 !important;
}

/* Settings description */

.settings-item .description,
.setting-row .description,
.account-setting-row .description {
  color: #7b887d !important;
  font-size: 11px !important;
}

/* ---------- Toggle ---------- */

.switch,
.toggle {
  border-radius: 999px !important;
}

.switch input:checked + .slider,
.toggle input:checked + .slider {
  background: #8fbd8a !important;
}

/* ---------- Account sections ---------- */

.profile-section,
.account-section,
.settings-section {
  margin-top: 18px;
}

.profile-section-title,
.account-section-title,
.settings-section-title {
  margin: 0 5px 9px;
  color: #738078 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  text-transform: uppercase;
  letter-spacing: .6px;
}

/* ---------- Logout ---------- */

.logout-button {
  width: 100%;
  min-height: 50px;
  border-radius: 999px !important;
  background: #f8e5e3 !important;
  color: #984f4b !important;
  border: none !important;
  font-weight: 850 !important;
}

/* ---------- Notification bell ---------- */

.notification-bell {
  background: #ffffff !important;
  border: none !important;
  border-radius: 50% !important;
  box-shadow: 0 5px 16px rgba(39, 66, 45, .07) !important;
}

.notification-badge {
  background: #d97878 !important;
  border: 2px solid #f5f7f1 !important;
}

/* ---------- Auth screens ---------- */

.auth-container,
.auth-card {
  background: #ffffff !important;
  border-radius: 32px !important;
  border: 1px solid #e3ebe0 !important;
  box-shadow:
    0 15px 45px rgba(39, 66, 45, .07) !important;
}

.auth-card {
  padding: 28px !important;
}

.auth-card h1,
.auth-card h2 {
  color: #193a27 !important;
  font-weight: 900 !important;
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {

  .profile-header,
  .profile-hero,
  .account-header {
    border-radius: 26px !important;
    padding: 20px !important;
  }

  .profile-actions,
  .account-actions {
    gap: 7px !important;
  }

  .profile-actions button,
  .account-actions button {
    min-height: 46px !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .invitation-item,
  .invitation-card,
  .invite-item,
  .contact-item,
  .contact-card {
    border-radius: 19px !important;
  }

}


/* =========================================================
   OweMe — Add Expense FINAL UI OVERRIDE
========================================================= */

/* Add Expense modal itself */
#addExpenseModal {
  background: rgba(25, 48, 32, 0.24) !important;
  backdrop-filter: blur(8px) !important;
}

/* Modal panel */
#addExpenseModal .modal-content,
#addExpenseModal .modal-card,
#addExpenseModal .modal-dialog {
  width: min(560px, calc(100% - 24px)) !important;
  max-width: 560px !important;
  max-height: calc(100dvh - 24px) !important;

  margin: 12px auto !important;
  padding: 0 !important;

  background: #ffffff !important;
  border: 1px solid #e3ebe0 !important;
  border-radius: 30px !important;

  overflow-y: auto !important;

  box-shadow:
    0 24px 70px rgba(25, 48, 32, 0.16) !important;
}

/* Add Expense header */
#addExpenseModal .modal-header {
  position: sticky;
  top: 0;
  z-index: 20;

  display: flex;
  align-items: center;
  justify-content: space-between;

  min-height: 68px;
  padding: 16px 20px !important;

  background: rgba(255,255,255,.96) !important;
  border-bottom: 1px solid #edf1eb !important;

  backdrop-filter: blur(14px);
}

/* Add Expense title */
#addExpenseModal .modal-header h2,
#addExpenseModal .modal-header h3,
#addExpenseModal .modal-title {
  margin: 0 !important;

  color: #193a27 !important;
  font-size: 20px !important;
  font-weight: 900 !important;
  letter-spacing: -.6px;
}

/* Close button */
#addExpenseModal .modal-close,
#addExpenseModal .modal-header .close,
#addExpenseModal button.close {
  position: relative !important;

  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;

  padding: 0 !important;

  display: flex !important;
  align-items: center;
  justify-content: center;

  border: none !important;
  border-radius: 50% !important;

  background: #edf4e9 !important;
  color: #285236 !important;

  z-index: 30 !important;
}

/* Body */
#addExpenseModal .modal-body {
  padding: 20px !important;
}

/* Form sections */
#addExpenseModal .form-section,
#addExpenseModal .expense-section,
#addExpenseModal .modal-section {
  margin-bottom: 16px !important;
  padding: 17px !important;

  background: #f5f8f3 !important;
  border: none !important;
  border-radius: 23px !important;
}

/* Section headings */
#addExpenseModal .form-section-title,
#addExpenseModal .expense-section-title,
#addExpenseModal .modal-section-title {
  margin-bottom: 11px !important;

  color: #193a27 !important;
  font-size: 14px !important;
  font-weight: 900 !important;
}

/* All labels */
#addExpenseModal label {
  color: #526457 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

/* All inputs */
#addExpenseModal input,
#addExpenseModal select,
#addExpenseModal textarea {
  background: #ffffff !important;
  border: 1.5px solid #dfe8db !important;
  border-radius: 17px !important;

  color: #193a27 !important;
}

/* Amount */
#addExpenseModal input[type="number"] {
  min-height: 58px !important;

  font-size: 22px !important;
  font-weight: 900 !important;
}

/* Focus */
#addExpenseModal input:focus,
#addExpenseModal select:focus,
#addExpenseModal textarea:focus {
  border-color: #9fc89a !important;
  box-shadow:
    0 0 0 4px rgba(185,220,179,.23) !important;
}

/* =========================================================
   WHO SHOULD SHARE
========================================================= */

#addExpenseModal .participant-row,
#addExpenseModal .expense-participant-row {
  min-height: 54px !important;

  display: flex;
  align-items: center;

  padding: 9px 10px !important;

  background: transparent !important;
  border: none !important;
  border-radius: 16px !important;
}

/* Selected */
#addExpenseModal .participant-row.selected,
#addExpenseModal .expense-participant-row.selected {
  background: #e5f1df !important;
}

/* Participant checkbox */
#addExpenseModal input[type="checkbox"] {
  width: 20px !important;
  height: 20px !important;
  min-height: 20px !important;

  accent-color: #5e9b65;
}

/* Username + name */
#addExpenseModal .participant-row span,
#addExpenseModal .expense-participant-row span {
  color: #193a27 !important;
}

/* =========================================================
   CUSTOM SPLIT
========================================================= */

#addExpenseModal .custom-split-row,
#addExpenseModal .split-amount-row {
  min-height: 57px !important;

  display: flex;
  align-items: center;

  padding: 8px 4px !important;

  background: transparent !important;

  border-bottom: 1px solid #dfe8db !important;
}

#addExpenseModal .custom-split-row:last-child,
#addExpenseModal .split-amount-row:last-child {
  border-bottom: none !important;
}

/* Split amount */
#addExpenseModal .custom-split-row input,
#addExpenseModal .split-amount-row input {
  width: 110px !important;
  min-height: 44px !important;

  padding: 8px 11px !important;

  text-align: right;

  border-radius: 14px !important;

  background: #ffffff !important;
}

/* =========================================================
   ADD EXPENSE SUBMIT
========================================================= */

#addExpenseModal button[type="submit"],
#addExpenseModal .primary-button,
#addExpenseModal .success-button {
  width: 100% !important;
  min-height: 54px !important;

  margin-top: 6px !important;

  border: none !important;
  border-radius: 999px !important;

  background: #1b4a2c !important;
  color: #ffffff !important;

  font-weight: 900 !important;
}

/* Cancel */
#addExpenseModal .secondary-button {
  width: 100% !important;
  min-height: 50px !important;

  border-radius: 999px !important;

  background: #edf4e9 !important;
  color: #285236 !important;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

  #addExpenseModal .modal-content,
  #addExpenseModal .modal-card,
  #addExpenseModal .modal-dialog {
    width: calc(100% - 16px) !important;
    max-height: calc(100dvh - 16px) !important;

    margin: 8px auto !important;

    border-radius: 28px !important;
  }

  #addExpenseModal .modal-header {
    min-height: 64px;
    padding: 13px 16px !important;
  }

  #addExpenseModal .modal-body {
    padding: 16px !important;
  }

  #addExpenseModal .form-section,
  #addExpenseModal .expense-section,
  #addExpenseModal .modal-section {
    padding: 14px !important;
    border-radius: 20px !important;
  }

}


/* =========================================================
   OweMe — GROUP DETAIL PAGE
   Vietnam / Group View
========================================================= */

/* ---------- Group detail overall ---------- */

#groupDetail,
.group-detail,
.group-page {
  background: transparent !important;
}

/* ---------- Group hero ---------- */

#groupDetail .group-header,
.group-detail .group-header,
.group-page .group-header {
  padding: 26px 0 18px !important;
  margin-bottom: 0 !important;
}

/* Group name */

#groupDetail .group-header h1,
#groupDetail .group-header h2,
.group-detail .group-header h1,
.group-detail .group-header h2,
.group-page .group-header h1,
.group-page .group-header h2 {
  margin: 0 0 8px !important;

  color: #193a27 !important;
  font-size: 32px !important;
  line-height: 1.05 !important;
  font-weight: 900 !important;
  letter-spacing: -1.5px !important;
}

/* Members + amount spent */

#groupDetail .group-header p,
#groupDetail .group-header .group-meta,
.group-detail .group-header p,
.group-detail .group-header .group-meta,
.group-page .group-header p,
.group-page .group-header .group-meta {
  margin: 0 !important;

  color: #718074 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

/* ---------- Group action row ---------- */

#groupDetail .group-actions,
.group-detail .group-actions,
.group-page .group-actions {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 54px 54px !important;

  gap: 10px !important;

  margin: 14px 0 12px !important;
  padding: 0 !important;
}

/* Add Expense */

#groupDetail .group-actions .add-expense-button,
#groupDetail .group-actions #addExpenseButton,
.group-detail .group-actions .add-expense-button,
.group-page .group-actions .add-expense-button {
  width: 100% !important;
  min-height: 58px !important;

  border-radius: 999px !important;

  background: #f3d66b !important;
  color: #4d4729 !important;

  border: 1px solid #dfc24e !important;

  box-shadow:
    0 6px 15px rgba(185, 154, 45, .12) !important;

  font-size: 16px !important;
  font-weight: 900 !important;
}

/* Add member / close group */

#groupDetail .group-actions .icon-button,
#groupDetail .group-actions .header-action-button,
.group-detail .group-actions .icon-button,
.group-detail .group-actions .header-action-button,
.group-page .group-actions .icon-button,
.group-page .group-actions .header-action-button {
  width: 54px !important;
  height: 54px !important;
  min-width: 54px !important;
  min-height: 54px !important;

  padding: 0 !important;

  border-radius: 18px !important;

  background: #fff8df !important;
  border: 1px solid #f0d36a !important;

  color: #80691b !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Close group */

#groupDetail .group-actions .danger-button,
.group-detail .group-actions .danger-button,
.group-page .group-actions .danger-button {
  background: #fff0ef !important;
  border-color: #efc3c0 !important;
  color: #d97878 !important;
}

/* ---------- Divider ---------- */

#groupDetail .group-actions + .history-tabs,
.group-detail .group-actions + .history-tabs,
.group-page .group-actions + .history-tabs {
  margin-top: 4px !important;
  padding-top: 13px !important;
}

#groupDetail .group-actions + .history-tabs::before,
.group-detail .group-actions + .history-tabs::before,
.group-page .group-actions + .history-tabs::before {
  left: 0 !important;
  right: 0 !important;

  height: 3px !important;

  background: #d5e8d1 !important;
}

/* ---------- Tabs ---------- */

#groupDetail .history-tabs,
.group-detail .history-tabs,
.group-page .history-tabs {
  min-height: 66px !important;

  padding: 6px !important;

  border-radius: 999px !important;

  background: #e6f0e2 !important;

  gap: 3px !important;
}

#groupDetail .history-tab,
.group-detail .history-tab,
.group-page .history-tab {
  min-height: 54px !important;

  border-radius: 999px !important;

  color: #718074 !important;

  font-size: 15px !important;
  font-weight: 850 !important;
}

#groupDetail .history-tab.active,
.group-detail .history-tab.active,
.group-page .history-tab.active {
  background: #ffffff !important;
  color: #193a27 !important;

  box-shadow:
    0 3px 10px rgba(39, 66, 45, .07) !important;
}

/* =========================================================
   PAYABLE / RECEIVABLE CARDS
========================================================= */

/* Make these cards look like the screenshot */

#groupDetail .payable-card,
#groupDetail .receivable-card,
.group-detail .payable-card,
.group-detail .receivable-card,
.payable-card,
.receivable-card {
  position: relative;

  margin-top: 16px !important;
  padding: 25px 24px !important;

  min-height: 220px;

  background: #ffffff !important;

  border: 1px solid #e2eadf !important;
  border-radius: 31px !important;

  box-shadow:
    0 8px 25px rgba(39, 66, 45, .055) !important;
}

/* Titles */

#groupDetail .payable-card h3,
#groupDetail .receivable-card h3,
.group-detail .payable-card h3,
.group-detail .receivable-card h3,
.payable-card h3,
.receivable-card h3 {
  margin: 0 0 8px !important;

  color: #193a27 !important;

  font-size: 19px !important;
  font-weight: 900 !important;
}

/* Description */

#groupDetail .payable-card .description,
#groupDetail .receivable-card .description,
.payable-card .description,
.receivable-card .description {
  color: #718074 !important;

  font-size: 15px !important;
  font-weight: 650 !important;
}

/* Amount */

#groupDetail .payable-card .amount,
#groupDetail .receivable-card .amount,
.payable-card .amount,
.receivable-card .amount {
  margin-top: 2px !important;

  color: #718074 !important;

  font-size: 22px !important;
  font-weight: 900 !important;
}

/* People count */

#groupDetail .payable-card .people-count,
#groupDetail .receivable-card .people-count,
.payable-card .people-count,
.receivable-card .people-count {
  margin-top: 22px !important;

  color: #718074 !important;

  font-size: 15px !important;
  font-weight: 650 !important;
}

/* Settle / details buttons */

#groupDetail .payable-card button,
#groupDetail .receivable-card button,
.group-detail .payable-card button,
.group-detail .receivable-card button,
.payable-card button,
.receivable-card button {
  margin-top: 17px !important;

  min-height: 48px !important;

  padding: 10px 24px !important;

  border: none !important;
  border-radius: 999px !important;

  background: #eaf3e6 !important;
  color: #285236 !important;

  font-size: 14px !important;
  font-weight: 900 !important;
}

/* ---------- Payable accent ---------- */

#groupDetail .payable-card .amount,
.payable-card .amount {
  color: #718074 !important;
}

/* ---------- Receivable accent ---------- */

#groupDetail .receivable-card .amount,
.receivable-card .amount {
  color: #39744b !important;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

  #groupDetail .group-header,
  .group-detail .group-header,
  .group-page .group-header {
    padding-top: 23px !important;
    padding-bottom: 13px !important;
  }

  #groupDetail .group-header h1,
  #groupDetail .group-header h2,
  .group-detail .group-header h1,
  .group-detail .group-header h2,
  .group-page .group-header h1,
  .group-page .group-header h2 {
    font-size: 30px !important;
  }

  #groupDetail .group-actions,
  .group-detail .group-actions,
  .group-page .group-actions {
    grid-template-columns: minmax(0, 1fr) 52px 52px !important;
    gap: 8px !important;
  }

  #groupDetail .group-actions .add-expense-button,
  .group-detail .group-actions .add-expense-button,
  .group-page .group-actions .add-expense-button {
    min-height: 55px !important;
  }

  #groupDetail .group-actions .icon-button,
  #groupDetail .group-actions .header-action-button,
  .group-detail .group-actions .icon-button,
  .group-detail .group-actions .header-action-button,
  .group-page .group-actions .icon-button,
  .group-page .group-actions .header-action-button {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
  }

  #groupDetail .history-tabs,
  .group-detail .history-tabs,
  .group-page .history-tabs {
    min-height: 62px !important;
  }

  #groupDetail .history-tab,
  .group-detail .history-tab,
  .group-page .history-tab {
    min-height: 50px !important;
    font-size: 14px !important;
  }

  #groupDetail .payable-card,
  #groupDetail .receivable-card,
  .group-detail .payable-card,
  .group-detail .receivable-card,
  .payable-card,
  .receivable-card {
    min-height: 210px;
    padding: 22px 20px !important;
    border-radius: 27px !important;
  }

}

/* =========================================================
   OweMe Soft UI — Stage 8
   HEADER + BOTTOM NAV + APP FRAME
========================================================= */

/* =========================================================
   APP FRAME
========================================================= */

body {
  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(218, 235, 211, .38),
      transparent 34%
    ),
    #f5f7f1 !important;
}

/* Main app area */

#app {
  min-height: 100dvh;
  background: transparent !important;
}

/* =========================================================
   HEADER
========================================================= */

.header {
  position: relative !important;
  z-index: 1100 !important;

  min-height: 88px !important;

  padding:
    14px 22px !important;

  background:
    rgba(255, 254, 248, .96) !important;

  border-bottom:
    1px solid #e8eee5 !important;

  box-shadow:
    0 3px 14px rgba(39, 66, 45, .025) !important;

  backdrop-filter: blur(18px);
}

/* Header inner alignment */

.header-inner,
.header-content {
  min-height: 60px;

  display: flex;
  align-items: center;
}

/* =========================================================
   LOGO
========================================================= */

.logo,
.brand,
.app-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Logo icon */

.logo-icon,
.brand-icon,
.app-logo-icon {
  width: 56px !important;
  height: 56px !important;

  min-width: 56px !important;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 18px !important;

  background:
    #e6f1e4 !important;

  border:
    2px solid #d5e5d2 !important;

  color: #285236 !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.8),
    0 4px 12px rgba(39,66,45,.05);
}

/* Brand text */

.logo-text,
.brand-name,
.app-name {
  color: #193a27 !important;

  font-size: 28px !important;
  font-weight: 900 !important;

  letter-spacing: -1.2px !important;
}

/* =========================================================
   HEADER ACTIONS
========================================================= */

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Generic header icon */

.header-action-button {
  width: 52px !important;
  height: 52px !important;

  min-width: 52px !important;
  min-height: 52px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  padding: 0 !important;

  border-radius: 50% !important;

  background: #ffffff !important;

  border: 1px solid #e5ece2 !important;

  color: #285236 !important;

  box-shadow:
    0 5px 16px rgba(39,66,45,.055) !important;
}

/* Notification */

.notification-bell {
  position: relative;

  width: 58px !important;
  height: 58px !important;

  min-width: 58px !important;

  border-radius: 50% !important;

  background: #fffaf0 !important;

  border: 2px solid #f0d36a !important;

  color: #285236 !important;

  box-shadow:
    0 5px 15px rgba(185,154,45,.08) !important;
}

/* Notification badge */

.notification-badge {
  position: absolute !important;

  top: -2px !important;
  right: -2px !important;

  min-width: 22px !important;
  height: 22px !important;

  padding: 0 5px !important;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px !important;

  background: #d97878 !important;

  color: #ffffff !important;

  border: 2px solid #fffaf0 !important;

  font-size: 10px !important;
  font-weight: 900 !important;
}

/* =========================================================
   PAGE CONTENT
========================================================= */

#content {
  position: relative;
  z-index: 1;

  padding-top: 20px !important;

  padding-bottom:
    calc(var(--nav-height, 76px) + 42px) !important;
}

/* First content item */

#content > :first-child {
  margin-top: 0 !important;
}

/* =========================================================
   BOTTOM NAV — FLOATING
========================================================= */

.bottom-nav {
  position: fixed !important;

  left: 50% !important;
  bottom: 14px !important;

  transform: translateX(-50%) !important;

  z-index: 1500 !important;

  width: min(656px, calc(100% - 28px)) !important;

  height: 82px !important;

  padding: 8px 12px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: space-around !important;

  background:
    rgba(255,255,255,.97) !important;

  border:
    1px solid #e1e9de !important;

  border-radius: 28px !important;

  box-shadow:
    0 10px 30px rgba(39,66,45,.08),
    0 2px 8px rgba(39,66,45,.035) !important;

  backdrop-filter: blur(18px);
}

/* Bottom nav buttons */

.bottom-nav button {
  position: relative;

  flex: 1;

  width: auto !important;
  min-width: 52px !important;
  max-width: 78px !important;

  height: 64px !important;
  min-height: 64px !important;

  padding: 0 !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  border-radius: 23px !important;

  background: transparent !important;

  border: none !important;

  color: #7e8d82 !important;
}

/* Icons */

.bottom-nav button svg,
.bottom-nav button i {
  width: 25px;
  height: 25px;

  color: currentColor;

  stroke-width: 1.9;
}

/* Active nav */

.bottom-nav button.active {
  background: #e4f0df !important;

  color: #285236 !important;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.45);
}

/* =========================================================
   MOBILE APP FRAME
========================================================= */

@media (max-width: 600px) {

  .header {
    min-height: 78px !important;

    padding:
      10px 16px !important;
  }

  .header-inner,
  .header-content {
    min-height: 58px;
  }

  .logo-icon,
  .brand-icon,
  .app-logo-icon {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;

    border-radius: 16px !important;
  }

  .logo-text,
  .brand-name,
  .app-name {
    font-size: 26px !important;
  }

  .header-action-button {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
  }

  .notification-bell {
    width: 52px !important;
    height: 52px !important;
    min-width: 52px !important;
  }

  #content {
    padding-top: 16px !important;

    padding-bottom:
      calc(82px + 14px + env(safe-area-inset-bottom, 0px) + 28px)
      !important;
  }

  .bottom-nav {
    bottom:
      calc(8px + env(safe-area-inset-bottom, 0px)) !important;

    width:
      calc(100% - 28px) !important;

    height: 76px !important;

    padding: 6px 8px !important;

    border-radius: 27px !important;
  }

  .bottom-nav button {
    height: 62px !important;
    min-height: 62px !important;

    border-radius: 21px !important;
  }

  .bottom-nav button svg,
  .bottom-nav button i {
    width: 24px;
    height: 24px;
  }

}

/* =========================================================
   SAFE AREA
========================================================= */

@supports (padding-bottom: env(safe-area-inset-bottom)) {

  .bottom-nav {
    margin-bottom: env(safe-area-inset-bottom);
  }

}

/* =========================================================
   PREVENT HORIZONTAL SHIFT
========================================================= */

html,
body,
#app {
  overflow-x: hidden !important;
}

/* =========================================================
   REMOVE OLD NAV BORDER EFFECTS
========================================================= */

.bottom-nav::before,
.bottom-nav::after {
  display: none !important;
}

/* OweMe — Add Expense form styling only */
#addExpenseForm { gap: 0 !important; }
#addExpenseForm > label { margin-bottom: 16px !important; color: #526457 !important; }
#addExpenseForm > label > input { min-height: 52px !important; padding: 12px 16px !important; background: #fbfcfa !important; border: 1.5px solid #dfe8db !important; border-radius: 17px !important; color: #193a27 !important; }
#addExpenseForm #expenseAmount { min-height: 60px !important; background: #f4f8f1 !important; color: #193a27 !important; font-size: 23px !important; font-weight: 900 !important; }
#addExpenseForm > label > input:focus { background: #fff !important; border-color: #9fc89a !important; box-shadow: 0 0 0 4px rgba(185,220,179,.2) !important; }

/* OweMe — Add Expense: Paid By + Participants */
#addExpenseForm > .section-title { margin: 8px 0 9px !important; color: #193a27 !important; font-size: 14px !important; font-weight: 900 !important; }
#addExpenseForm > .section-title .muted { color: #7b887d !important; font-size: 11px !important; }
#addExpenseForm > .section-title + .card { margin-bottom: 17px !important; padding: 15px 16px !important; background: #f0f5eb !important; border: 1px solid #e1ebdc !important; border-radius: 19px !important; box-shadow: none !important; }
#addExpenseForm > .section-title + .card strong { color: #193a27 !important; font-size: 14px !important; font-weight: 900 !important; }
#addExpenseForm > .section-title + .card .muted { margin-top: 4px !important; color: #7b887d !important; font-size: 11px !important; }
#addExpenseForm .participant-list-card { margin: 0 0 20px !important; padding: 6px !important; background: #f5f8f3 !important; border: none !important; border-radius: 21px !important; box-shadow: none !important; }
#addExpenseForm .participant-list { display: flex !important; flex-direction: column !important; gap: 2px !important; }
#addExpenseForm .participant-option { display: flex !important; align-items: center !important; min-height: 54px !important; padding: 9px 10px !important; border-radius: 16px !important; background: transparent !important; }
#addExpenseForm .participant-option:has(.participant-checkbox:checked) { background: #e6f1e1 !important; }
#addExpenseForm .participant-checkbox { width: 20px !important; height: 20px !important; min-height: 20px !important; margin: 0 12px 0 2px !important; accent-color: #5e9b65 !important; }
#addExpenseForm .participant-option .user-name { color: #193a27 !important; font-size: 14px !important; font-weight: 850 !important; }
#addExpenseForm .participant-option .user-handle { display: inline !important; margin-left: 5px !important; color: #78857b !important; font-size: 12px !important; font-weight: 600 !important; }

/* OweMe — Groups page tabs: match Group Detail */
#groupsPage .history-tabs,
.groups-page .history-tabs {
  min-height: 66px !important;
  padding: 6px !important;
  border-radius: 999px !important;
  background: #e6f0e2 !important;
  gap: 3px !important;
}

#groupsPage .history-tab,
.groups-page .history-tab {
  flex: 1 !important;
  min-height: 54px !important;
  border-radius: 999px !important;
  color: #718074 !important;
  background: transparent !important;
  font-size: 15px !important;
  font-weight: 850 !important;
}

#groupsPage .history-tab.active,
.groups-page .history-tab.active {
  background: #ffffff !important;
  color: #193a27 !important;
  box-shadow: 0 3px 10px rgba(39,66,45,.07) !important;
}

@media (max-width: 600px) {
  #groupsPage .history-tabs,
  .groups-page .history-tabs {
    min-height: 62px !important;
  }

  #groupsPage .history-tab,
  .groups-page .history-tab {
    min-height: 50px !important;
    font-size: 14px !important;
  }
}

/* OweMe — Groups tabs: match Group Detail */
.groups-tab-container {
  display: flex !important;
  width: 100% !important;
  min-height: 66px !important;
  padding: 6px !important;
  gap: 3px !important;
  margin-bottom: 20px !important;
  border-radius: 999px !important;
  background: #e6f0e2 !important;
}

.groups-tab {
  flex: 1 !important;
  min-height: 54px !important;
  border: none !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #718074 !important;
  font-size: 15px !important;
  font-weight: 850 !important;
}

.groups-tab.active {
  background: #ffffff !important;
  color: #193a27 !important;
  box-shadow: 0 3px 10px rgba(39,66,45,.07) !important;
}

@media (max-width: 600px) {
  .groups-tab-container {
    min-height: 62px !important;
  }

  .groups-tab {
    min-height: 50px !important;
    font-size: 14px !important;
  }
}

/* OweMe login brand — tagline below OweMe */
.auth-card .brand {
  display: grid !important;
  grid-template-columns: 78px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  column-gap: 14px !important;
  row-gap: 0 !important;
  align-items: center !important;
  text-align: left !important;
  margin-bottom: 28px !important;
}

.auth-card .brand .brand-icon {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  margin: 0 !important;
}

.auth-card .brand h1 {
  grid-column: 2 !important;
  grid-row: 1 !important;
  margin: 0 !important;
  align-self: end !important;
}

.auth-card .brand p {
  grid-column: 2 !important;
  grid-row: 2 !important;
  margin: 2px 0 0 !important;
  align-self: start !important;
  line-height: 1.35 !important;
}

@media (max-width: 600px) {
  .auth-card .brand {
    grid-template-columns: 70px minmax(0, 1fr) !important;
    column-gap: 12px !important;
  }
}


/* =========================================================
   OweMe — FINAL LOGIN SPACING SYSTEM
   Normalize auth heights, gaps and vertical rhythm
========================================================= */

.auth-card {
  padding: 30px !important;
}

/* ---------- Brand ---------- */

.auth-card .brand {
  display: grid !important;
  grid-template-columns: 72px minmax(0, 1fr) !important;
  grid-template-rows: auto auto !important;
  column-gap: 14px !important;
  row-gap: 1px !important;
  align-items: center !important;
  text-align: left !important;
  margin: 0 0 26px !important;
}

.auth-card .brand .brand-icon {
  grid-column: 1 !important;
  grid-row: 1 / span 2 !important;
  width: 64px !important;
  height: 64px !important;
  min-width: 64px !important;
  margin: 0 !important;
}

.auth-card .brand h1 {
  grid-column: 2 !important;
  grid-row: 1 !important;
  margin: 0 !important;
  line-height: 1.05 !important;
  align-self: end !important;
}

.auth-card .brand p {
  grid-column: 2 !important;
  grid-row: 2 !important;
  margin: 3px 0 0 !important;
  line-height: 1.3 !important;
  align-self: start !important;
}

/* ---------- Login heading ---------- */

.auth-card #loginPanel h2 {
  margin: 0 0 20px !important;
  line-height: 1.2 !important;
}

/* ---------- Login form ---------- */

.auth-card #loginForm {
  margin: 0 !important;
}

/* Labels */

.auth-card #loginForm > label {
  display: block !important;
  margin: 0 0 16px !important;
  color: #526457 !important;
  font-weight: 800 !important;
  line-height: 1.35 !important;
}

/* Inputs */

.auth-card #loginForm > label > input {
  display: block !important;
  width: 100% !important;
  height: 52px !important;
  min-height: 52px !important;
  margin-top: 7px !important;
  padding: 0 15px !important;
  border-radius: 17px !important;
}

/* ---------- Forgot password ---------- */

.auth-card #forgotPasswordButton {
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1.3 !important;
}

.auth-card #loginForm > p:has(#forgotPasswordButton) {
  margin: -3px 0 18px !important;
  line-height: 1.3 !important;
}

/* ---------- Login button ---------- */

.auth-card #loginForm > .primary-button,
.auth-card #loginForm > button.primary-button {
  width: 100% !important;
  height: 52px !important;
  min-height: 52px !important;
  margin: 0 !important;
  padding: 0 18px !important;
  border-radius: 17px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ---------- Create account ---------- */

.auth-card #loginPanel > .switch-text {
  margin: 18px 0 0 !important;
  text-align: center !important;
  line-height: 1.4 !important;
}

.auth-card #loginPanel > .switch-text .link-button {
  margin-left: 3px !important;
  padding: 0 !important;
}

/* ---------- Mobile ---------- */

@media (max-width: 600px) {

  .auth-card {
    padding: 24px 20px !important;
  }

  .auth-card .brand {
    grid-template-columns: 64px minmax(0, 1fr) !important;
    column-gap: 12px !important;
    margin-bottom: 24px !important;
  }

  .auth-card .brand .brand-icon {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
  }

  .auth-card #loginPanel h2 {
    margin-bottom: 18px !important;
  }

  .auth-card #loginForm > label {
    margin-bottom: 15px !important;
  }

  .auth-card #loginForm > label > input {
    height: 52px !important;
    min-height: 52px !important;
  }

  .auth-card #loginForm > p:has(#forgotPasswordButton) {
    margin-bottom: 17px !important;
  }

  .auth-card #loginForm > .primary-button,
  .auth-card #loginForm > button.primary-button {
    height: 52px !important;
    min-height: 52px !important;
  }

  .auth-card #loginPanel > .switch-text {
    margin-top: 17px !important;
  }

}


/* =========================================================
   OweMe — Center Create Group Navigation Button
========================================================= */

.nav-create-group {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 64px !important;
  padding: 0 !important;
  overflow: visible !important;
}

.nav-create-group::before {
  display: none !important;
}

.nav-create-group-icon {
  width: 52px !important;
  height: 52px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  border-radius: 18px !important;

  background: #193a27 !important;
  color: #ffffff !important;

  font-size: 30px !important;
  font-weight: 400 !important;
  line-height: 1 !important;

  box-shadow:
    0 8px 20px rgba(25, 58, 39, 0.20) !important;

  transform: translateY(-8px) !important;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease !important;
}

.nav-create-group:hover .nav-create-group-icon {
  transform: translateY(-10px) !important;
  box-shadow:
    0 11px 24px rgba(25, 58, 39, 0.24) !important;
}

.nav-create-group:active .nav-create-group-icon {
  transform: translateY(-5px) scale(0.96) !important;
}

.nav-create-group small {
  display: none !important;
}

@media (max-width: 600px) {

  .nav-create-group {
    min-width: 58px !important;
  }

  .nav-create-group-icon {
    width: 50px !important;
    height: 50px !important;
    border-radius: 17px !important;
    font-size: 29px !important;
  }

}


/* =========================================================
   OweMe — Groups navigation hierarchy
========================================================= */

.groups-section-tabs {
  display: flex !important;
  width: 100% !important;
  min-height: 52px !important;
  padding: 0 !important;
  gap: 28px !important;
  margin: 0 0 18px !important;
  border-radius: 0 !important;
  background: transparent !important;
  border-bottom: 1px solid #e4ebe0 !important;
}

.groups-section-tabs .groups-tab {
  position: relative !important;
  flex: 0 0 auto !important;
  min-height: 52px !important;
  padding: 0 4px !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #718074 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

.groups-section-tabs .groups-tab.active {
  color: #193a27 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.groups-section-tabs .groups-tab.active::after {
  content: "" !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: -1px !important;
  height: 3px !important;
  border-radius: 999px !important;
  background: #193a27 !important;
}

.groups-sub-tabs {
  display: flex !important;
  width: 100% !important;
  min-height: 46px !important;
  padding: 4px !important;
  gap: 3px !important;
  margin: 0 0 24px !important;
  border-radius: 16px !important;
  background: #e8f1e4 !important;
  border: none !important;
}

.groups-sub-tabs .history-tab {
  flex: 1 !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  border: none !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: #718074 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

.groups-sub-tabs .history-tab.active {
  background: #ffffff !important;
  color: #193a27 !important;
  box-shadow: 0 2px 8px rgba(39, 66, 45, 0.07) !important;
}

#groupsTabContent {
  margin-top: 0 !important;
}

@media (max-width: 600px) {
  .groups-section-tabs {
    min-height: 48px !important;
    gap: 24px !important;
    margin-bottom: 16px !important;
  }

  .groups-section-tabs .groups-tab {
    min-height: 48px !important;
    font-size: 15px !important;
  }

  .groups-sub-tabs {
    min-height: 44px !important;
    margin-bottom: 22px !important;
  }

  .groups-sub-tabs .history-tab {
    min-height: 36px !important;
    font-size: 13px !important;
  }
}


/* =========================================================
   OweMe — Home balance breakdown
========================================================= */

.home-balance-breakdown {
  display: grid !important;
  grid-template-columns: 1fr auto 1fr !important;
  align-items: stretch !important;
  margin-top: 20px !important;
  padding-top: 18px !important;
  border-top: 1px solid rgba(39, 66, 45, 0.12) !important;
}

.home-balance-breakdown-item {
  display: flex !important;
  flex-direction: column !important;
  gap: 5px !important;
}

.home-balance-breakdown-item:first-child {
  padding-right: 18px !important;
}

.home-balance-breakdown-item:last-child {
  padding-left: 18px !important;
}

.home-balance-breakdown-item span {
  font-size: 12px !important;
  line-height: 1.3 !important;
  color: #718074 !important;
  font-weight: 700 !important;
}

.home-balance-breakdown-item strong {
  font-size: 17px !important;
  line-height: 1.25 !important;
  color: #193a27 !important;
  font-weight: 850 !important;
}

.home-balance-breakdown-divider {
  width: 1px !important;
  background: rgba(39, 66, 45, 0.12) !important;
}

@media (max-width: 600px) {

  .home-balance-breakdown {
    margin-top: 18px !important;
    padding-top: 16px !important;
  }

  .home-balance-breakdown-item:first-child {
    padding-right: 12px !important;
  }

  .home-balance-breakdown-item:last-child {
    padding-left: 12px !important;
  }

  .home-balance-breakdown-item span {
    font-size: 11px !important;
  }

  .home-balance-breakdown-item strong {
    font-size: 16px !important;
  }

}


/* OweMe — keep bottom navigation anchored to the bottom */
.bottom-nav {
  bottom: max(4px, env(safe-area-inset-bottom)) !important;
}

@media (max-width: 700px) {
  .bottom-nav {
    bottom: max(4px, env(safe-area-inset-bottom)) !important;
  }
}

/* Compact Members tab */
.group-member-list-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 14px 0 !important;
  border-bottom: none !important;
}

.group-member-list-item + .group-member-list-item {
  border-top: none !important;
}

.group-member-list-name {
  margin: 0 !important;
  font-size: 16px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
  color: #193a27 !important;
}

.group-member-list-role {
  margin: 0 !important;
  flex: 0 0 auto !important;
  font-size: 12px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  color: #718074 !important;
  text-transform: uppercase !important;
}

/* =========================================================
   OweMe — Add Expense Modal Proportions
   ========================================================= */

/* Main modal */
.add-expense-modal,
.expense-modal {
  max-width: 520px !important;
  width: calc(100% - 32px) !important;
  max-height: 90vh !important;
  overflow-y: auto !important;
}

/* Section spacing */
#addExpenseForm > .section-title,
#addExpenseForm > .expense-split-section,
#addExpenseForm > .expense-receipt-section {
  margin-top: 20px !important;
}

/* Paid-by card */
#addExpenseForm > .card {
  margin-bottom: 18px !important;
  padding: 16px 20px !important;
}

/* Who should share */
#addExpenseForm .participant-list-card {
  padding: 10px !important;
  border-radius: 22px !important;
}

#addExpenseForm .participant-option {
  min-height: 52px !important;
  padding: 7px 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

#addExpenseForm .participant-option > div {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

#addExpenseForm .participant-option .user-name,
#addExpenseForm .participant-option .user-handle {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin: 0 !important;
}

#addExpenseForm .participant-option .user-name::after {
  content: " ·" !important;
  margin-left: 7px !important;
}

#addExpenseForm .participant-option .user-handle {
  font-size: 14px !important;
}

/* Split heading */
#addExpenseForm .expense-split-section {
  margin-top: 20px !important;
}

#addExpenseForm .expense-split-section .section-title {
  margin-bottom: 14px !important;
}

/* Equal / Custom toggle */
#addExpenseForm .split-mode-toggle {
  height: 48px !important;
  min-height: 48px !important;
  padding: 4px !important;
  margin-bottom: 12px !important;
}

#addExpenseForm .split-mode-button {
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 14px !important;
}

/* Split member rows */
#addExpenseForm .expense-share-row {
  min-height: 60px !important;
  height: 60px !important;
  padding: 4px 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  border-bottom: none !important;
}

#addExpenseForm .expense-share-row > div:first-child {
  min-width: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
}

#addExpenseForm .expense-share-row .user-name,
#addExpenseForm .expense-share-row .user-handle {
  margin: 0 !important;
  white-space: nowrap !important;
}

/* Remove the second line in split names */
#addExpenseForm .expense-share-row .user-handle {
  font-size: 14px !important;
}

/* Amount control — ONE clean box */
#addExpenseForm .expense-share-input-wrap {
  width: 128px !important;
  min-width: 128px !important;
  height: 50px !important;
  min-height: 50px !important;
  padding: 0 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  border: 1px solid #e4ebe0 !important;
  border-radius: 16px !important;
  background: #f8faf5 !important;
  box-sizing: border-box !important;
}

#addExpenseForm .expense-share-input-wrap > span {
  flex: 0 0 auto !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #718074 !important;
}

#addExpenseForm .expense-share-input-wrap input {
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  text-align: right !important;
  font-size: 20px !important;
  font-weight: 800 !important;
  color: #193a27 !important;
}

/* Remove number-input spinner */
#addExpenseForm .expense-share-input-wrap input::-webkit-inner-spin-button,
#addExpenseForm .expense-share-input-wrap input::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  margin: 0 !important;
}

#addExpenseForm .expense-share-input-wrap input[type="number"] {
  appearance: textfield !important;
  -moz-appearance: textfield !important;
}

/* Split summary */
#addExpenseForm .expense-split-summary {
  min-height: 72px !important;
  margin-top: 10px !important;
  padding: 14px 20px !important;
  border-radius: 18px !important;
}

/* Receipt */
#addExpenseForm .expense-receipt-section {
  margin-top: 20px !important;
}

#addExpenseForm .receipt-upload-box {
  min-height: 56px !important;
  height: 56px !important;
  padding: 0 18px !important;
  display: flex !important;
  align-items: center !important;
}

/* Submit */
#addExpenseForm > .primary-button {
  width: min(100%, 310px) !important;
  height: 52px !important;
  min-height: 52px !important;
  margin: 20px auto 0 !important;
  display: block !important;
}

/* Mobile */
@media (max-width: 600px) {
  .add-expense-modal,
  .expense-modal {
    width: calc(100% - 32px) !important;
    padding: 22px 18px !important;
    border-radius: 28px !important;
  }

  #addExpenseForm .expense-share-input-wrap {
    width: 120px !important;
    min-width: 120px !important;
  }

  #addExpenseForm .expense-share-row {
    min-height: 58px !important;
    height: 58px !important;
  }
}


/* =========================================================
   OweMe — Split Section as One Card
   ========================================================= */

#addExpenseForm .expense-split-section {
  background: #f8faf5 !important;
  border: 1px solid #e4ebe0 !important;
  border-radius: 24px !important;
  padding: 18px !important;
  margin-top: 20px !important;
  box-sizing: border-box !important;
}

/* Split heading */
#addExpenseForm .expense-split-section .section-title {
  margin: 0 0 12px !important;
  padding: 0 !important;
}

/* Description */
#addExpenseForm .expense-split-section .section-title .muted {
  margin-top: 4px !important;
  line-height: 1.45 !important;
}

/* Equal / Custom */
#addExpenseForm .expense-split-section .split-mode-toggle {
  height: 48px !important;
  min-height: 48px !important;
  margin: 0 0 10px !important;
  padding: 4px !important;
  border-radius: 16px !important;
}

#addExpenseForm .expense-split-section .split-mode-button {
  height: 40px !important;
  min-height: 40px !important;
  border-radius: 13px !important;
}

/* Member rows — completely flat */
#addExpenseForm .expense-split-section .expense-share-row {
  min-height: 56px !important;
  height: 56px !important;
  padding: 4px 2px !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

/* Keep name on one line */
#addExpenseForm .expense-split-section .expense-share-row > div:first-child {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-width: 0 !important;
}

#addExpenseForm .expense-split-section .expense-share-row .user-name,
#addExpenseForm .expense-split-section .expense-share-row .user-handle {
  margin: 0 !important;
  white-space: nowrap !important;
}

#addExpenseForm .expense-split-section .expense-share-row .user-handle {
  font-size: 14px !important;
}

/* Remove the accidental extra separator */
#addExpenseForm .participant-option .user-name::after {
  content: none !important;
}

/* Amount — one clean control */
#addExpenseForm .expense-split-section .expense-share-input-wrap {
  width: 120px !important;
  min-width: 120px !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 12px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  border: 1px solid #e1e8dd !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

#addExpenseForm .expense-split-section .expense-share-input-wrap > span {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #718074 !important;
}

#addExpenseForm .expense-split-section .expense-share-input-wrap input {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  text-align: right !important;
  font-size: 20px !important;
  font-weight: 800 !important;
}

/* Assigned / Remaining stays as the one nested status card */
#addExpenseForm .expense-split-section .expense-split-summary {
  min-height: 68px !important;
  margin: 8px 0 0 !important;
  padding: 12px 16px !important;
  border-radius: 18px !important;
  box-sizing: border-box !important;
}

/* Mobile */
@media (max-width: 600px) {
  #addExpenseForm .expense-split-section {
    padding: 16px !important;
    border-radius: 22px !important;
  }

  #addExpenseForm .expense-split-section .expense-share-input-wrap {
    width: 116px !important;
    min-width: 116px !important;
  }
}


/* =========================================================
   OweMe — Paid By + Participants Combined Card
   ========================================================= */

#addExpenseForm .expense-participants-section {
  margin-top: 20px !important;
  padding: 18px !important;
  background: #f8faf5 !important;
  border: 1px solid #e4ebe0 !important;
  border-radius: 24px !important;
  box-sizing: border-box !important;
}

/* Paid by */
#addExpenseForm .expense-participants-section > .section-title:first-child {
  margin: 0 0 8px !important;
}

#addExpenseForm .expense-paid-by {
  padding: 12px 0 16px !important;
  margin: 0 0 4px !important;
}

#addExpenseForm .expense-paid-by strong {
  display: block !important;
  font-size: 16px !important;
  margin-bottom: 4px !important;
}

#addExpenseForm .expense-paid-by .muted {
  font-size: 12px !important;
}

/* Who should share */
#addExpenseForm .expense-participants-section > .section-title {
  margin: 14px 0 8px !important;
}

#addExpenseForm .expense-participants-section .participant-list {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

/* Flat member rows */
#addExpenseForm .expense-participants-section .participant-option {
  height: 46px !important;
  min-height: 46px !important;
  padding: 5px 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#addExpenseForm .expense-participants-section .participant-option:hover,
#addExpenseForm .expense-participants-section .participant-option:has(
  .participant-checkbox:checked
) {
  background: transparent !important;
  box-shadow: none !important;
}

/* Compact checkbox */
#addExpenseForm .expense-participants-section .participant-checkbox {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  margin: 0 !important;
}

/* Username + display name */
#addExpenseForm .expense-participants-section .participant-option > div {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  min-width: 0 !important;
}

#addExpenseForm .expense-participants-section .user-name,
#addExpenseForm .expense-participants-section .user-handle {
  margin: 0 !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
}

#addExpenseForm .expense-participants-section .user-name {
  font-size: 15px !important;
}

#addExpenseForm .expense-participants-section .user-handle {
  font-size: 14px !important;
}

/* Mobile */
@media (max-width: 600px) {
  #addExpenseForm .expense-participants-section {
    padding: 16px !important;
    border-radius: 22px !important;
  }
}


/* =========================================================
   Paid By + Participants — tighter spacing
   ========================================================= */

#addExpenseForm .expense-participants-section {
  padding: 16px 18px !important;
}

/* Paid by heading */
#addExpenseForm .expense-participants-section > .section-title:first-child {
  margin: 0 0 4px !important;
}

/* Paid by information */
#addExpenseForm .expense-paid-by {
  padding: 4px 0 10px !important;
  margin: 0 !important;
}

#addExpenseForm .expense-paid-by strong {
  margin: 0 0 3px !important;
  line-height: 1.2 !important;
}

/* Bring Who should share closer */
#addExpenseForm .expense-participants-section > .section-title {
  margin: 10px 0 6px !important;
}

/* Display names only */
#addExpenseForm .participant-display-name {
  font-size: 15px !important;
  font-weight: 750 !important;
  color: #193a27 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Keep participant rows compact */
#addExpenseForm .expense-participants-section .participant-option {
  height: 42px !important;
  min-height: 42px !important;
  padding: 3px 0 !important;
}


/* Compact rounded participant checkbox */
#addExpenseForm .expense-participants-section .participant-checkbox {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  flex: 0 0 24px !important;
  margin: 0 !important;
  border-radius: 7px !important;
  overflow: hidden !important;
  transform: none !important;
}

/* Rounded checkbox appearance */
#addExpenseForm .expense-participants-section .participant-option {
  gap: 10px !important;
  border-radius: 12px !important;
}


/* =========================================================
   FINAL — OweMe participant checkbox
   ========================================================= */

#addExpenseForm .expense-participants-section
.participant-option
input.participant-checkbox {
  appearance: none !important;
  -webkit-appearance: none !important;

  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;

  flex: 0 0 22px !important;
  margin: 0 10px 0 0 !important;
  padding: 0 !important;

  border: 2px solid #9db5a0 !important;
  border-radius: 7px !important;

  background: #ffffff !important;
  box-shadow: none !important;

  position: relative !important;
  cursor: pointer !important;
}

/* Checked state */
#addExpenseForm .expense-participants-section
.participant-option
input.participant-checkbox:checked {
  background: #5e9b65 !important;
  border-color: #5e9b65 !important;
}

/* White checkmark */
#addExpenseForm .expense-participants-section
.participant-option
input.participant-checkbox:checked::after {
  content: "" !important;
  position: absolute !important;

  width: 6px !important;
  height: 11px !important;

  left: 6px !important;
  top: 2px !important;

  border: solid #ffffff !important;
  border-width: 0 2px 2px 0 !important;

  transform: rotate(45deg) !important;
}

/* Keep participant row compact */
#addExpenseForm .expense-participants-section
.participant-option {
  height: 42px !important;
  min-height: 42px !important;
  padding: 3px 0 !important;
  gap: 0 !important;
}


/* Final participant name sizing */
#addExpenseForm .expense-participants-section
.participant-display-name {
  font-size: 15px !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
  color: #193a27 !important;
}


/* Participant names match section heading size */
#addExpenseForm .expense-participants-section .participant-display-name {
  font-size: 18px !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
  color: #193a27 !important;
}


/* Participant names — final proportional sizing */
#addExpenseForm .expense-participants-section .participant-display-name {
  font-size: 15px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  color: #193a27 !important;
}


/* =========================================================
   FINAL FINAL — Participant display names
   ========================================================= */

#addExpenseForm .expense-participants-section
.participant-option
.participant-display-name {
  font-family: inherit !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 18px !important;
  letter-spacing: 0 !important;
  color: #193a27 !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}


/* Tighten spacing between participant checkbox rows */
#addExpenseForm .expense-participants-section .participant-list {
  gap: 0 !important;
}

#addExpenseForm .expense-participants-section .participant-option {
  height: 32px !important;
  min-height: 32px !important;
  padding: 0 !important;
  margin: 0 !important;
}

#addExpenseForm .expense-participants-section
.participant-option + .participant-option {
  margin-top: 0 !important;
}

/* Keep checkbox and name aligned */
#addExpenseForm .expense-participants-section
.participant-option
input.participant-checkbox {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
}


/* =========================================================
   OweMe — Group Action Colors
   ========================================================= */

/* Add Expense — reference light green */
#groupDetail .group-actions .add-expense-button,
#groupDetail .group-actions #addExpenseButton,
.group-detail .group-actions .add-expense-button,
.group-page .group-actions .add-expense-button {
  background: #E6F0E0 !important;
  color: #193A27 !important;
  border-color: #CFE1C9 !important;
  box-shadow: 0 6px 15px rgba(39, 66, 45, .08) !important;
}

/* + Members — dark green */
#groupDetail .group-actions .icon-button:not(.danger-button),
#groupDetail .group-actions .header-action-button:not(.danger-button),
.group-detail .group-actions .icon-button:not(.danger-button),
.group-detail .group-actions .header-action-button:not(.danger-button),
.group-page .group-actions .icon-button:not(.danger-button),
.group-page .group-actions .header-action-button:not(.danger-button) {
  background: #193A27 !important;
  border-color: #193A27 !important;
  color: #FFFFFF !important;
}

/* Close Group — maroon */
#groupDetail .group-actions .danger-button,
.group-detail .group-actions .danger-button,
.group-page .group-actions .danger-button {
  background: #8B3F47 !important;
  border-color: #8B3F47 !important;
  color: #FFFFFF !important;
}


/* =========================================================
   OweMe — Group Action Colors — FINAL
   ========================================================= */

/* Add Expense — light green */
.group-top-actions > .add-expense-button {
  background: #E6F0E0 !important;
  color: #193A27 !important;
  border-color: #CFE1C9 !important;
  box-shadow: 0 6px 15px rgba(39, 66, 45, .08) !important;
}

/* + Members — dark green */
.group-top-actions > .members-button {
  background: #193A27 !important;
  border-color: #193A27 !important;
  color: #FFFFFF !important;
}

/* Members icon */
.group-top-actions > .members-button svg,
.group-top-actions > .members-button .group-action-plus {
  color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}

/* Close Group — maroon */
.group-top-actions > .close-group-button {
  background: #8B3F47 !important;
  border-color: #8B3F47 !important;
  color: #FFFFFF !important;
}

/* Close Group icon */
.group-top-actions > .close-group-button svg,
.group-top-actions > .close-group-button .group-action-close {
  color: #FFFFFF !important;
  stroke: #FFFFFF !important;
}


/* Tighten group header → action buttons */
#groupDetail .group-header,
.group-detail .group-header,
.group-page .group-header {
  padding-bottom: 6px !important;
}

#groupDetail .group-top-actions,
.group-detail .group-top-actions,
.group-page .group-top-actions {
  margin-top: 4px !important;
}


/* FINAL — tighter group header to actions */
#groupDetail .group-top-actions,.group-detail .group-top-actions,.group-page .group-top-actions { margin-top: -8px !important; }
#groupDetail .group-header,.group-detail .group-header,.group-page .group-header { padding-bottom: 0 !important; }

#groupDetail .group-header,.group-detail .group-header,.group-page .group-header { padding-bottom: 0 !important; }
#groupDetail .group-top-actions,.group-detail .group-top-actions,.group-page .group-top-actions { margin-top: 0 !important; }



/* Center View QR Code button */
.payment-detail-qr { align-items: center !important; }

/* Center QR button text itself */
.payment-detail-qr .payment-detail-qr-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  width: 235px !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* FINAL FINAL — truly center View QR Code */
.payment-detail-qr .payment-detail-qr-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: center !important;
  box-sizing: border-box !important;
  width: 235px !important;
  min-width: 235px !important;
  max-width: 235px !important;
  height: 56px !important;
  padding: 0 !important;
  margin: 0 auto !important;
  text-align: center !important;
  text-indent: 0 !important;
  direction: ltr !important;
  white-space: nowrap !important;
}
.payment-detail-qr .payment-detail-qr-button::before,
.payment-detail-qr .payment-detail-qr-button::after {
  content: none !important;
}

/* Center View QR Code in settlement payment modal */
.settle-payment-qr-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  text-indent: 0 !important;
}

/* Align settlement QR button with payment details */
.settle-payment-qr-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 14px 0 0 0 !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
  text-align: center !important;
}

/* =========================================================
   OweMe — Pending Payment Card Theme
========================================================= */
.pending-payment-list-item {
  display: flex !important;
  align-items: center !important;
  gap: 14px !important;
  min-height: 82px !important;
  padding: 16px 18px !important;
  margin-bottom: 10px !important;
  background: #F8FAF5 !important;
  border: 1px solid #E1EADF !important;
  border-radius: 22px !important;
  box-shadow: 0 5px 18px rgba(39,66,45,.045) !important;
}

.pending-payment-list-item:last-child {
  margin-bottom: 0 !important;
}

.pending-payment-info {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.pending-payment-title {
  color: #193A27 !important;
  font-size: 16px !important;
  font-weight: 850 !important;
}

.pending-payment-meta {
  margin-top: 4px !important;
  color: #718074 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

.pending-payment-notes {
  margin-top: 3px !important;
  color: #8A958C !important;
}

.pending-payment-amount {
  color: #39744B !important;
  font-size: 16px !important;
  font-weight: 900 !important;
}

.pending-payment-review-button {
  flex: 0 0 auto !important;
  min-height: 42px !important;
  padding: 9px 17px !important;
  border: none !important;
  border-radius: 999px !important;
  background: #E6F0E0 !important;
  color: #39744B !important;
  font-size: 13px !important;
  font-weight: 850 !important;
}

@media (max-width: 500px) {
  .pending-payment-list-item {
    gap: 10px !important;
    padding: 14px 15px !important;
    min-height: 76px !important;
    border-radius: 20px !important;
  }

  .pending-payment-title {
    font-size: 14px !important;
  }

  .pending-payment-meta {
    font-size: 11px !important;
  }

  .pending-payment-amount {
    font-size: 14px !important;
  }

  .pending-payment-review-button {
    min-height: 38px !important;
    padding: 8px 13px !important;
    font-size: 12px !important;
  }
}

/* Members — one outer card, flat rows */
.group-members-list {
  background: #F8FAF5 !important;
  border: 1px solid #E1EADF !important;
  border-radius: 22px !important;
  padding: 8px 18px !important;
  box-shadow: 0 5px 18px rgba(39,66,45,.04) !important;
}

.group-member-list-item {
  background: transparent !important;
  border: 0 !important;
  border-top: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 14px 0 !important;
  margin: 0 !important;
}

.group-member-list-item + .group-member-list-item {
  border-top: 0 !important;
}

.group-member-list-name {
  color: #193A27 !important;
  font-size: 16px !important;
  font-weight: 800 !important;
}

.group-member-list-role {
  color: #718074 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

/* Members — match Pending Payment typography */
.group-member-list-name {
  font-size: 16px !important;
  font-weight: 850 !important;
  line-height: 1.2 !important;
}

.group-member-list-role {
  font-size: 12px !important;
  font-weight: 800 !important;
}

/* Members — compact spacing to match Pending Payments */
.group-members-list {
  padding: 6px 18px !important;
}

.group-member-list-item {
  padding: 9px 0 !important;
  min-height: 0 !important;
}

.group-member-list-item + .group-member-list-item {
  margin-top: 0 !important;
}

.group-member-list-name {
  font-size: 16px !important;
  line-height: 1.2 !important;
  font-weight: 850 !important;
}

.group-member-list-role {
  font-size: 12px !important;
  line-height: 1.2 !important;
  font-weight: 800 !important;
}

/* Payment Details — tighter row spacing */
#paymentDetailsList .payment-detail-info {
  gap: 0 !important;
}

#paymentDetailsList .payment-detail-row {
  padding: 10px 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
}

#paymentDetailsList .payment-detail-row + .payment-detail-row {
  margin-top: 0 !important;
}

#paymentDetailsList .payment-detail-row strong,
#paymentDetailsList .payment-detail-row span {
  line-height: 1.25 !important;
}

/* Payment Details — compact lower section */
#paymentDetailsList .payment-detail-actions {
  gap: 6px !important;
  margin-top: 4px !important;
}

#paymentDetailsList .payment-detail-actions > .muted {
  margin: 0 !important;
  line-height: 1.2 !important;
}

#paymentDetailsList .payment-detail-action-buttons {
  margin: 0 auto !important;
  gap: 10px !important;
}

#paymentDetailsList .payment-detail-action-buttons > button {
  margin: 0 !important;
}

#paymentDetailsList .payment-detail-card .secondary-button,
#paymentDetailsList .payment-detail-card a.secondary-button {
  margin-top: 4px !important;
}

#paymentDetailsList .payment-detail-card .payment-detail-actions + * {
  margin-top: 8px !important;
}


/* Receivables action buttons */
.balance-detail-row > div:last-child {
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}

.balance-detail-row > div:last-child .small-button {
  margin: 0 !important;
  min-height: 46px !important;
  padding: 10px 18px !important;
  white-space: nowrap !important;
}

.balance-detail-row > div:last-child .payme-receivable-button {
  background: #193A27 !important;
  border-color: #193A27 !important;
  color: #FFFFFF !important;
}

@media (max-width: 600px) {
  .balance-detail-row > div:last-child {
    gap: 6px !important;
  }

  .balance-detail-row > div:last-child .small-button {
    padding: 9px 13px !important;
    font-size: 13px !important;
  }
}


/* Review Payment — prevent action buttons from being clipped */
.modal .payment-review-actions,
.modal .review-payment-actions {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  gap: 10px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.modal .payment-review-actions > button,
.modal .review-payment-actions > button {
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
  white-space: nowrap !important;
}

@media (max-width: 600px) {
  .modal .payment-review-actions,
  .modal .review-payment-actions {
    gap: 8px !important;
  }

  .modal .payment-review-actions > button,
  .modal .review-payment-actions > button {
    padding-left: 6px !important;
    padding-right: 6px !important;
    font-size: 13px !important;
  }
}


/* Payables — Settle button */
.balance-detail-row .payable-action-buttons .settle-payable-button,
.balance-detail-row button.settle-payable-button,
button.settle-payable-button {
  background: #193A27 !important;
  background-color: #193A27 !important;
  border: 1px solid #193A27 !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
}

/* Group top action colors */
.group-top-actions > .add-expense-button { background: #193A27 !important; border-color: #193A27 !important; color: #FFFFFF !important; }
.group-top-actions > .members-button { background: #E6F0E0 !important; border-color: #CFE1C9 !important; color: #193A27 !important; }
.group-top-actions > .members-button svg, .group-top-actions > .members-button .group-action-plus { color: #193A27 !important; stroke: #193A27 !important; }
.group-top-actions > .close-group-button { background: #F8E5E3 !important; border-color: #F8E5E3 !important; color: #984F4B !important; }
.group-top-actions > .close-group-button svg, .group-top-actions > .close-group-button .group-action-close { color: #984F4B !important; stroke: #984F4B !important; }

\n/* Payment Details — tighter account number to action icons */
#paymentDetailsList .payment-detail-actions {
  margin-top: 0 !important;
  gap: 2px !important;
}

#paymentDetailsList .payment-detail-action-buttons {
  margin-top: 0 !important;
}




/* Header — match logo and notification to Refresh button */
.brand-logo {
  width: 76px !important;
  height: 76px !important;
  object-fit: contain !important;
  flex: 0 0 76px !important;
}

#notificationButton {
  width: 76px !important;
  height: 76px !important;
  min-width: 76px !important;
  min-height: 76px !important;
  max-width: 76px !important;
  max-height: 76px !important;
  box-sizing: border-box !important;
}


/* Header — notification matches Refresh exactly */
#notificationButton {
  width: 76px !important;
  height: 76px !important;
  min-width: 76px !important;
  min-height: 76px !important;
  max-width: 76px !important;
  max-height: 76px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  box-sizing: border-box !important;
  background: #FFFFFF !important;
  border: 1px solid #E1EADF !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#notificationButton .notification-bell {
  width: 28px !important;
  height: 28px !important;
  margin: 0 !important;
  display: block !important;
}


/* FINAL — notification bell matches Refresh */
#notificationButton {
  width: 76px !important;
  height: 76px !important;
  min-width: 76px !important;
  min-height: 76px !important;
  max-width: 76px !important;
  max-height: 76px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  box-sizing: border-box !important;
}

#notificationButton .notification-bell {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#notificationButton .notification-bell svg {
  width: 28px !important;
  height: 28px !important;
  display: block !important;
}

/* Header — notification matches Refresh */
#notificationButton {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  max-width: 52px !important;
  max-height: 52px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  border-radius: 50% !important;
}

#notificationButton .notification-bell {
  position: static !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#notificationButton .notification-bell svg {
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
}


/* FINAL HEADER — Refresh and Notification use identical outer controls */
#refreshButton,
#notificationButton {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  max-width: 52px !important;
  max-height: 52px !important;
  flex: 0 0 52px !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
  border-radius: 50% !important;
  background: #FFFFFF !important;
  border: 1px solid #E5ECE2 !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#refreshButton > span {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
}

#notificationButton .notification-bell {
  position: static !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  max-width: 24px !important;
  max-height: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#notificationButton .notification-bell svg {
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
  display: block !important;
}


/* Group Members — final member name size */
.group-member-list-name {
  font-size: 12px !important;
  line-height: 1.2 !important;
  font-weight: 850 !important;
}



/* =========================================================
   Tabs — match Own Group / Others Group design
========================================================= */

/* Invitations / Contacts + Settlements / Pending / Members */
.history-tabs {
  display: flex !important;
  width: 100% !important;
  min-height: 46px !important;
  padding: 4px !important;
  gap: 3px !important;
  margin: 0 0 24px !important;
  border-radius: 16px !important;
  background: #e8f1e4 !important;
  border: none !important;
  box-sizing: border-box !important;
}

.history-tabs .history-tab {
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  border: none !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: #718074 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

.history-tabs .history-tab.active {
  background: #ffffff !important;
  color: #193a27 !important;
  box-shadow: 0 2px 8px rgba(39, 66, 45, 0.07) !important;
}

/* Keep the existing Own Group / Others Group design identical */
.groups-sub-tabs {
  min-height: 46px !important;
  padding: 4px !important;
  gap: 3px !important;
  border-radius: 16px !important;
  background: #e8f1e4 !important;
}

.groups-sub-tabs .history-tab {
  min-height: 38px !important;
  padding: 0 12px !important;
  border-radius: 12px !important;
  font-size: 14px !important;
}

@media (max-width: 600px) {
  .history-tabs {
    min-height: 46px !important;
    padding: 4px !important;
    gap: 3px !important;
    margin-bottom: 22px !important;
  }

  .history-tabs .history-tab {
    min-height: 38px !important;
    padding: 0 8px !important;
    font-size: 14px !important;
  }
}



/* =========================================================
   Invitations / Contacts — match Own Group / Others Group
========================================================= */

.invites-tab-container {
  display: flex !important;
  width: 100% !important;
  min-height: 46px !important;
  padding: 4px !important;
  gap: 3px !important;
  margin: 0 0 24px !important;
  border-radius: 16px !important;
  background: #e8f1e4 !important;
  border: none !important;
  box-sizing: border-box !important;
}

.invites-tab-container .groups-tab {
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  min-height: 38px !important;
  padding: 0 12px !important;
  border: none !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: #718074 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

.invites-tab-container .groups-tab.active {
  background: #ffffff !important;
  color: #193a27 !important;
  box-shadow: 0 2px 8px rgba(39, 66, 45, 0.07) !important;
}

@media (max-width: 600px) {
  .invites-tab-container {
    min-height: 46px !important;
    padding: 4px !important;
    gap: 3px !important;
    margin-bottom: 22px !important;
  }

  .invites-tab-container .groups-tab {
    min-height: 38px !important;
    padding: 0 8px !important;
    font-size: 14px !important;
  }
}


/* Add Expense button inside expense modal */
#addExpenseForm .add-expense-button {
  width: 50% !important;
  min-width: 0 !important;
  max-width: 50% !important;
  flex: 0 0 50% !important;
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
}


/* Fix preferred payment checkbox */
.modal input[type="checkbox"] {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  padding: 0 !important;
  margin: 0 !important;
  appearance: auto !important;
  -webkit-appearance: auto !important;
  box-sizing: border-box !important;
}


/* Add Expense button - 50% width */
.modal .add-expense-button {
  width: 50% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: block !important;
}


/* Contacts — emphasize contact names */
.contact-list-display-name {
  font-weight: 800 !important;
  color: #193A27 !important;
}


/* Invitations — improve green contrast */
.invitation-status {
  background: #D8EAD2 !important;
  color: #39744B !important;
}

.invites-tab-container {
  background: #DDEBD8 !important;
}

.invites-tab-container .groups-tab {
  color: #5F7465 !important;
}

.invites-tab-container .groups-tab.active {
  color: #193A27 !important;
}


/* Add Expense modal — compact submit button */
#addExpenseForm button[type="submit"] {
  width: 55% !important;
  min-width: 0 !important;
  max-width: 55% !important;
  flex: 0 0 55% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: block !important;
}


/* Add Expense modal — compact submit button */
#addExpenseForm button[type="submit"] {
  width: 55% !important;
  min-width: 0 !important;
  max-width: 55% !important;
  flex: 0 0 55% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: block !important;
}

/* =========================================================
   PENDING TAB — FINAL UNIFORM LIST
========================================================= */

#pendingPayablesList,
#pendingPaymentsList {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

#pendingPayablesList .pending-flat-row,
#pendingPaymentsList .pending-flat-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 90px 78px !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 56px !important;
  margin: 0 !important;
  padding: 9px 0 !important;
  box-sizing: border-box !important;
  column-gap: 10px !important;
}

#pendingPayablesList .pending-flat-row + .pending-flat-row,
#pendingPaymentsList .pending-flat-row + .pending-flat-row {
  border-top: 1px solid #E1EADF !important;
}

#pendingPayablesList .pending-flat-label,
#pendingPaymentsList .pending-flat-label {
  grid-column: 1 !important;
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
  color: #193A27 !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

#pendingPayablesList .pending-flat-amount,
#pendingPaymentsList .pending-flat-amount {
  grid-column: 2 !important;
  width: 90px !important;
  min-width: 90px !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: right !important;
  justify-self: end !important;
  color: #39744B !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

#pendingPayablesList .pending-flat-action,
#pendingPaymentsList .pending-flat-action {
  grid-column: 3 !important;
  width: 78px !important;
  min-width: 78px !important;
  max-width: 78px !important;
  height: 36px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  justify-self: end !important;
  box-sizing: border-box !important;
  border: 0 !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 850 !important;
  line-height: 36px !important;
  text-align: center !important;
  white-space: nowrap !important;
}

#pendingPayablesList .pending-settle-action {
  background: #193A27 !important;
  color: #FFFFFF !important;
}

#pendingPaymentsList .pending-review-action {
  background: #E6F0E0 !important;
  color: #39744B !important;
}

.pending-section-title {
  margin-top: 28px !important;
}

.pending-list-empty {
  padding: 14px 0 !important;
  text-align: center !important;
}

@media (max-width: 600px) {
  #pendingPayablesList .pending-flat-row,
  #pendingPaymentsList .pending-flat-row {
    grid-template-columns: minmax(0, 1fr) 82px 72px !important;
    column-gap: 8px !important;
  }

  #pendingPayablesList .pending-flat-amount,
  #pendingPaymentsList .pending-flat-amount {
    width: 82px !important;
    min-width: 82px !important;
  }

  #pendingPayablesList .pending-flat-action,
  #pendingPaymentsList .pending-flat-action {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
  }
}

/* =========================================================
   GROUP PAGE — CLEAN 16PX SPACING
   Actual DOM:
   .group-header
   .group-top-actions
   .history-tabs
========================================================= */

#groupDetail .group-header,
.group-detail .group-header,
.group-page .group-header {
  padding: 0 !important;
  margin: 0 0 16px !important;
}

#groupDetail .group-header h1,
#groupDetail .group-header h2,
.group-detail .group-header h1,
.group-detail .group-header h2,
.group-page .group-header h1,
.group-page .group-header h2 {
  margin: 0 0 16px !important;
}

#groupDetail .group-header p,
#groupDetail .group-header .group-meta,
.group-detail .group-header p,
.group-detail .group-header .group-meta,
.group-page .group-header p,
.group-page .group-header .group-meta {
  margin: 0 !important;
}

#groupDetail .group-top-actions,
.group-detail .group-top-actions,
.group-page .group-top-actions {
  margin: 0 0 16px !important;
  padding: 0 !important;
}

#groupDetail .group-top-actions + .history-tabs,
.group-detail .group-top-actions + .history-tabs,
.group-page .group-top-actions + .history-tabs {
  margin: 0 0 16px !important;
  padding: 16px 0 0 !important;
}

#groupDetail .history-tabs,
.group-detail .history-tabs,
.group-page .history-tabs {
  margin: 0 0 16px !important;
}

/* =========================================================
   GROUP PAGE — ACTUAL HEADER / ACTIONS / TABS SPACING
========================================================= */

#groupDetail .group-header,
.group-detail .group-header,
.group-page .group-header {
  margin-bottom: 16px !important;
  padding-bottom: 0 !important;
}

#groupDetail .group-top-actions,
.group-detail .group-top-actions,
.group-page .group-top-actions {
  margin-top: 0 !important;
  margin-bottom: 16px !important;
}

/* The actual divider between action buttons and tabs */
#groupDetail .group-top-actions + .history-tabs,
.group-detail .group-top-actions + .history-tabs,
.group-page .group-top-actions + .history-tabs {
  position: relative !important;
  margin-top: 0 !important;
  padding-top: 16px !important;
}

/* Divider */
#groupDetail .group-top-actions + .history-tabs::before,
.group-detail .group-top-actions + .history-tabs::before,
.group-page .group-top-actions + .history-tabs::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 2px !important;
  background: #d5e8d1 !important;
}

/* Keep the actual tab container compact */
#groupDetail .history-tabs,
.group-detail .history-tabs,
.group-page .history-tabs {
  min-height: 54px !important;
  height: 54px !important;
  padding: 4px !important;
  margin-bottom: 16px !important;
  box-sizing: border-box !important;
}

/* Keep tab buttons centered inside the compact container */
#groupDetail .history-tabs .history-tab,
.group-detail .history-tabs .history-tab,
.group-page .history-tabs .history-tab {
  min-height: 46px !important;
  height: 46px !important;
}

/* =========================================================
   GROUP PAGE — REMOVE EXTRA SPACING
========================================================= */
#groupDetail .group-header,
.group-detail .group-header,
.group-page .group-header {
  margin: 0 !important;
  padding: 0 !important;
}

#groupDetail .group-header h1,
#groupDetail .group-header h2,
.group-detail .group-header h1,
.group-detail .group-header h2,
.group-page .group-header h1,
.group-page .group-header h2 {
  margin: 0 0 10px !important;
  padding: 0 !important;
}

#groupDetail .group-header p,
#groupDetail .group-header .group-meta,
.group-detail .group-header p,
.group-detail .group-header .group-meta,
.group-page .group-header p,
.group-page .group-header .group-meta {
  margin: 0 !important;
  padding: 0 !important;
}

#groupDetail .group-top-actions,
.group-detail .group-top-actions,
.group-page .group-top-actions {
  margin: 14px 0 14px !important;
  padding: 0 !important;
  transform: none !important;
}

#groupDetail .group-top-actions::after,
.group-detail .group-top-actions::after,
.group-page .group-top-actions::after {
  display: none !important;
}

#groupDetail .group-top-actions + .history-tabs,
.group-detail .group-top-actions + .history-tabs,
.group-page .group-top-actions + .history-tabs {
  margin: 0 0 14px !important;
  padding: 0 !important;
}

#groupDetail .history-tabs,
.group-detail .history-tabs,
.group-page .history-tabs {
  min-height: 46px !important;
  height: 46px !important;
  margin: 0 0 14px !important;
  padding: 4px !important;
  box-sizing: border-box !important;
}

#groupDetail .history-tabs .history-tab,
.group-detail .history-tabs .history-tab,
.group-page .history-tabs .history-tab {
  min-height: 38px !important;
  height: 38px !important;
  margin: 0 !important;
  padding: 0 12px !important;
}

/* Reduce space between group divider and tabs */
#groupDetail .group-top-actions + .history-tabs,
.group-detail .group-top-actions + .history-tabs,
.group-page .group-top-actions + .history-tabs {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

#groupDetail .history-tabs,
.group-detail .history-tabs,
.group-page .history-tabs {
  margin-top: 0 !important;
}

/* FINAL — close the gap between divider and group tabs */
#groupDetail .group-top-actions,
.group-detail .group-top-actions,
.group-page .group-top-actions {
  margin-bottom: 0 !important;
}

#groupDetail .history-tabs,
.group-detail .history-tabs,
.group-page .history-tabs {
  margin-top: 0 !important;
}

#groupDetail .group-top-actions::after,
.group-detail .group-top-actions::after,
.group-page .group-top-actions::after {
  display: block !important;
  bottom: -8px !important;
}

/* =========================================================
   GROUP PAGE — FINAL CLEAN ACTION/TAB DIVIDER
========================================================= */
#groupDetail .group-top-actions,
.group-detail .group-top-actions,
.group-page .group-top-actions {
  position: relative !important;
  margin: 14px 0 10px !important;
  padding: 0 0 10px !important;
  transform: none !important;
  border-bottom: 2px solid #cfe7da !important;
}

#groupDetail .group-top-actions::after,
.group-detail .group-top-actions::after,
.group-page .group-top-actions::after {
  content: none !important;
  display: none !important;
}

#groupDetail .group-top-actions + .history-tabs,
.group-detail .group-top-actions + .history-tabs,
.group-page .group-top-actions + .history-tabs {
  margin: 0 0 14px !important;
  padding: 0 !important;
}

#groupDetail .history-tabs,
.group-detail .history-tabs,
.group-page .history-tabs {
  margin-top: 0 !important;
  padding: 4px !important;
  min-height: 46px !important;
  height: 46px !important;
}


/* FINAL — remove extra gap above group tabs */
#groupDetail .group-top-actions,
.group-detail .group-top-actions,
.group-page .group-top-actions {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  border-bottom: 0 !important;
}

#groupDetail .group-top-actions + .history-tabs,
.group-detail .group-top-actions + .history-tabs,
.group-page .group-top-actions + .history-tabs {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

#groupDetail .history-tabs,
.group-detail .history-tabs,
.group-page .history-tabs {
  margin-top: 0 !important;
}

/* Keep only the original divider, positioned immediately below actions */
#groupDetail .group-top-actions::after,
.group-detail .group-top-actions::after,
.group-page .group-top-actions::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: -6px !important;
  height: 2px !important;
  background: #cfe7da !important;
  border-radius: 999px !important;
}

/* =========================================================
   PENDING — ONE CARD PER SECTION
========================================================= */
#pendingPayablesList,
#pendingPaymentsList {
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 0 24px !important;
  padding: 8px 18px !important;
  background: #ffffff !important;
  border: 1px solid #e1e9dd !important;
  border-radius: 22px !important;
  box-shadow: 0 4px 14px rgba(39,66,45,.05) !important;
}

#pendingPayablesList .pending-flat-row,
#pendingPaymentsList .pending-flat-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  align-items: center !important;
  gap: 14px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 13px 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

#pendingPayablesList .pending-flat-row + .pending-flat-row,
#pendingPaymentsList .pending-flat-row + .pending-flat-row {
  border-top: 0 !important;
}

#pendingPayablesList .pending-flat-label,
#pendingPaymentsList .pending-flat-label {
  margin: 0 !important;
  color: #193a27 !important;
  font-size: 15px !important;
  font-weight: 800 !important;
}

#pendingPayablesList .pending-flat-amount,
#pendingPaymentsList .pending-flat-amount {
  margin: 0 !important;
  color: #39744b !important;
  font-size: 17px !important;
  font-weight: 850 !important;
  white-space: nowrap !important;
}

#pendingPayablesList .pending-flat-action,
#pendingPaymentsList .pending-flat-action {
  margin: 0 !important;
  min-width: 92px !important;
  height: 44px !important;
  padding: 0 16px !important;
  border-radius: 999px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

#pendingPayablesList .pending-settle-action {
  background: #193a27 !important;
  border: 1px solid #193a27 !important;
  color: #ffffff !important;
}

#pendingPaymentsList .pending-review-action {
  background: #e6f0e0 !important;
  border: 1px solid #e6f0e0 !important;
  color: #39744b !important;
}

@media (max-width: 600px) {
  #pendingPayablesList,
  #pendingPaymentsList {
    padding: 6px 14px !important;
    border-radius: 20px !important;
  }

  #pendingPayablesList .pending-flat-row,
  #pendingPaymentsList .pending-flat-row {
    gap: 9px !important;
    padding: 12px 0 !important;
  }

  #pendingPayablesList .pending-flat-label,
  #pendingPaymentsList .pending-flat-label {
    font-size: 14px !important;
  }

  #pendingPayablesList .pending-flat-amount,
  #pendingPaymentsList .pending-flat-amount {
    font-size: 15px !important;
  }

  #pendingPayablesList .pending-flat-action,
  #pendingPaymentsList .pending-flat-action {
    min-width: 82px !important;
    height: 42px !important;
    padding: 0 12px !important;
  }
}

/* =========================================================
   MEMBERS — ONE CARD
========================================================= */
.group-members-list {
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 8px 18px !important;
  background: #ffffff !important;
  border: 1px solid #e1e9dd !important;
  border-radius: 22px !important;
  box-shadow: 0 4px 14px rgba(39,66,45,.05) !important;
}

.group-member-list-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 9px 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.group-member-list-item + .group-member-list-item {
  border-top: 0 !important;
}

.group-member-list-name {
  color: #193a27 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
}

.group-member-list-role {
  color: #718074 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  text-transform: none !important;
}

@media (max-width: 600px) {
  .group-members-list {
    padding: 6px 14px !important;
    border-radius: 20px !important;
  }

  .group-member-list-item {
    padding: 9px 0 !important;
  }
}



/* Payment received confirmation — fit both action buttons */
.modal-confirmation > div[style*="justify-content:flex-end"] {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  gap: 10px !important;
  overflow: hidden !important;
}

.modal-confirmation > div[style*="justify-content:flex-end"] > button {
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

@media (max-width: 600px) {
  .modal-confirmation > div[style*="justify-content:flex-end"] {
    gap: 8px !important;
  }

  .modal-confirmation > div[style*="justify-content:flex-end"] > button {
    padding-left: 6px !important;
    padding-right: 6px !important;
    font-size: 13px !important;
  }
}


/* Payment received confirmation — fit both action buttons */
.modal-confirmation > div[style*="justify-content:flex-end"] {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  gap: 10px !important;
  overflow: hidden !important;
}

.modal-confirmation > div[style*="justify-content:flex-end"] > button {
  flex: 1 1 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

@media (max-width: 600px) {
  .modal-confirmation > div[style*="justify-content:flex-end"] {
    gap: 8px !important;
  }

  .modal-confirmation > div[style*="justify-content:flex-end"] > button {
    padding-left: 6px !important;
    padding-right: 6px !important;
    font-size: 13px !important;
  }
}


/* Add Members modal — one card, no row dividers */
.selected-members-list .selected-member-row {
  border-bottom: none !important;
  border-top: none !important;
}


/* Add Members modal — single members card */
.selected-members-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  margin-bottom: 4px !important;
  padding: 6px 14px !important;
  background: #f8faf5 !important;
  border: 1px solid #e1e9dd !important;
  border-radius: 22px !important;
  box-sizing: border-box !important;
}

.selected-members-list .selected-member-row {
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 9px 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}


/* Add Members modal — tighten existing member rows */
.members-list-card .member-row {
  min-height: 0 !important;
  height: auto !important;
  padding: 3px 16px !important;
  margin: 0 !important;
  line-height: 1.2 !important;
}

.members-list-card .member-display-name,
.members-list-card .member-role {
  line-height: 1.2 !important;
}

@media (max-width: 500px) {
  .members-list-card .member-row {
    min-height: 0 !important;
    height: auto !important;
    padding: 3px 14px !important;
  }
}


/* Add Members modal — clean member rows */
.members-list-card .member-display-name {
  font-weight: 800 !important;
  color: #718074 !important;
}

.members-list-card .member-role {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 0 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  color: #718074 !important;
}


/* Add Members modal — clean, spacious member card */
.members-list-card {
  padding: 8px 18px !important;
  margin: 0 0 18px !important;
  background: #ffffff !important;
  border: 1px solid #e1e9dd !important;
  border-radius: 22px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

.members-list-card .member-row {
  min-height: 0 !important;
  height: auto !important;
  padding: 7px 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

.members-list-card .member-display-name {
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.3 !important;
}

.members-list-card .member-role {
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1.3 !important;
  padding: 0 !important;
  background: transparent !important;
}

@media (max-width: 500px) {
  .members-list-card {
    padding: 8px 16px !important;
  }

  .members-list-card .member-row {
    padding: 7px 0 !important;
  }
}


/* Group header — tighten title to meta */
.group-header h2 {
  margin-bottom: 6px !important;
}

.group-header p {
  margin-top: 0 !important;
}


/* Invitation accepted — stronger green */
.invitation-status {
  color: #39744B !important;
}

/* Members — Name | Spend | Payables | Receivables | Role */
.group-member-list-header {
  display: grid !important;
  grid-template-columns: 1.35fr .8fr .85fr 1fr .65fr !important;
  align-items: center !important;
  gap: 5px !important;
  padding: 0 0 8px !important;
  color: var(--muted) !important;
  font-size: 9px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.group-member-list-item {
  display: grid !important;
  grid-template-columns: 1.35fr .8fr .85fr 1fr .65fr !important;
  align-items: center !important;
  gap: 5px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  padding: 10px 0 !important;
}

.group-member-list-name {
  min-width: 0 !important;
  color: var(--text) !important;
  font-size: 13px !important;
  font-weight: 750 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.group-member-list-stat {
  min-width: 0 !important;
  color: var(--muted) !important;
  font-size: 10px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
}

.group-member-list-role {
  min-width: 0 !important;
  color: var(--muted) !important;
  font-size: 10px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  text-transform: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

@media (max-width: 600px) {

  .group-member-list-header,
  .group-member-list-item {
    grid-template-columns: 1.35fr .8fr .85fr 1fr .65fr !important;
    min-width: 0 !important;
  }

  .group-member-list-header {
    font-size: 8px !important;
    gap: 4px !important;
  }

  .group-member-list-item {
    gap: 4px !important;
    padding: 10px 0 !important;
  }

  .group-member-list-name {
    font-size: 12px !important;
  }

  .group-member-list-stat,
  .group-member-list-role {
    font-size: 9px !important;
  }

}

/* =========================================================
   OweMe — GROUP TOP ACTIONS
   Compact, consistent action sizing
   ========================================================= */

.group-top-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  gap: 0 !important;
}

.group-top-actions .add-expense-button {
  flex: 0 0 auto !important;
  margin-right: auto !important;
  height: 42px !important;
  min-height: 42px !important;
  box-sizing: border-box !important;
}

.group-icon-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  margin-left: 16px !important;
  flex: 0 0 auto !important;
}

.group-top-actions .group-icon-action {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  box-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 36px !important;
  box-sizing: border-box !important;
}

.group-top-actions .group-icon-action svg {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.group-top-actions .share-group-button,
.group-top-actions .members-button {
  color: var(--primary) !important;
}

.group-top-actions .close-group-button {
  color: #a55454 !important;
}

.group-top-actions .group-icon-action:hover,
.group-top-actions .group-icon-action:active,
.group-top-actions .group-icon-action:focus {
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

@media (max-width: 600px) {

  .group-icon-actions {
    gap: 6px !important;
    margin-left: 12px !important;
  }

  .group-top-actions .group-icon-action {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    flex-basis: 34px !important;
  }

  .group-top-actions .group-icon-action svg {
    width: 21px !important;
    height: 21px !important;
  }

}

/* =========================================================
   OweMe UI SYSTEM — BASE CONTROL NORMALIZATION
   ========================================================= */

/* ---------- Typography ---------- */

body {
  font-size: var(--text-body);
  line-height: 1.45;
}

.form-group label {
  margin-bottom: var(--space-2);
  font-size: var(--text-label);
  line-height: 1.3;
}

input,
select,
textarea {
  font-size: var(--text-body);
  line-height: 1.4;
}


/* ---------- Form spacing ---------- */

.form-group {
  margin-bottom: var(--space-4);
}


/* ---------- Standard buttons ---------- */

.primary-button,
button.primary-button,
.secondary-button,
button.secondary-button,
.danger-button,
button.danger-button,
.success-button,
button.success-button {
  min-height: var(--control-md);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}

.primary-button,
button.primary-button {
  padding: 0 16px;
}

.secondary-button,
button.secondary-button,
.danger-button,
button.danger-button,
.success-button,
button.success-button {
  padding: 0 16px;
}


/* ---------- Compact buttons ---------- */

.small-button {
  min-height: var(--control-sm);
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  line-height: 1.2;
}


/* ---------- Button groups ---------- */

.button-row,
.action-row {
  gap: var(--space-2);
  align-items: center;
}


/* ---------- Inputs ---------- */

input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select {
  min-height: var(--control-md);
  box-sizing: border-box;
  padding: 0 14px;
}

textarea {
  padding: 10px 14px;
  line-height: 1.4;
}


/* ---------- Consistent control radius ---------- */

input,
select,
textarea {
  border-radius: var(--control-radius);
}


/* ---------- Common headings ---------- */

.page-title {
  font-size: var(--text-page);
  line-height: 1.2;
}

h2 {
  line-height: 1.25;
}

h3 {
  line-height: 1.3;
}


/* ---------- Common text rhythm ---------- */

.muted,
.text-muted,
.helper-text,
.form-help {
  line-height: 1.4;
}

/* =========================================================
   Group tabs → first settlement card
   Reduce unnecessary vertical space
   ========================================================= */

.group-page .history-tabs + *,
#groupDetail .history-tabs + *,
.group-detail .history-tabs + * {
  margin-top: 12px !important;
}

/* =========================================================
   Transaction History — single-line rows
   ========================================================= */

.transaction-table th,
.transaction-table td,
.transactions-table th,
.transactions-table td {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  vertical-align: middle !important;
}

.transaction-table tr,
.transactions-table tr {
  height: 56px !important;
}

.transaction-table td,
.transactions-table td {
  line-height: 1.2 !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

/* =========================================================
   Mobile Bottom Navbar — dock directly to bottom
   ========================================================= */

@media (max-width: 600px) {

  .bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    margin-bottom: 0 !important;

    width: 100% !important;
    max-width: none !important;

    height: calc(76px + env(safe-area-inset-bottom, 0px)) !important;

    padding:
      8px 10px
      env(safe-area-inset-bottom, 0px) !important;

    border-radius: 25px 25px 0 0 !important;

    transform: none !important;
    box-sizing: border-box !important;
  }

}
