html, body {
  /*height: 100%;*/
  margin: 0;
  display: flex;
  flex-direction: column;
}

body {
  background: var(--body-bg);
  color: var(--body-text);
  /*height: 100vh;*/ /* fix height on mobile */
}

main {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* prevent extra page scroll */
}

.container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/*.scrollable-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 8px;
}*/
:root {
  --body-bg: #F2E9E4;
  --body-text: #222222;
  --header-bg: #E9D8D0;
  --accent-color: #C36F5D;
  --tile-bg: #E9D8D0;
}

/* ===== Dark Theme ===== */
[data-bs-theme="dark"] {
  --body-bg: #031C26;
  --body-text: #DDE6E9;
  --header-bg: #051821;
  --accent-color: #F28500;
  --tile-bg: #0A2C38;
}

header {
  background: var(--header-bg);
  color: var(--body-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profile-pic {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
}

.btn-theme-icon {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  color: var(--body-text);
  transition: color 0.3s ease;
}

.btn-theme-icon:hover {
  color: var(--accent-color);
}

.swal2-popup {
  background: var(--body-bg) !important;
  color: var(--body-text) !important;
}

.footer-nav {
  position: relative; 
  flex-shrink: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--header-bg);
  border-top: 1px solid rgba(0,0,0,0.1);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0.5rem 0;
  z-index: 1000;
}


.footer-nav a {
  flex-shrink: 0; 
  color: var(--body-text);
  text-decoration: none;
  font-size: 1.5rem;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: var(--accent-color);
}

#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--body-bg);
  color: var(--body-text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 2000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none; 
}


#splash-screen h1 {
  font-size: 2rem;
  margin: 0;
}

#splash-screen p {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: var(--accent-color);
}

body.swal2-shown {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-height: 100vh !important;
  width: 100% !important;
  overflow: hidden !important;
}

/* Style profile dropdown in dark mode */
[data-bs-theme="dark"] .dropdown-menu {
  background-color: var(--header-bg); /* Or another dark shade */
  color: var(--body-text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .dropdown-menu a {
  color: var(--body-text);
}

[data-bs-theme="dark"] .dropdown-menu a:hover {
  background-color: var(--accent-color);
  color: #fff;
}
/* ===== Profile Dropdown Fix for Light Theme ===== */
.dropdown-menu {
  background-color: var(--header-bg); /* same as header */
  color: var(--body-text);
  border: 1px solid rgba(0, 0, 0, 0.1); /* subtle border for separation */
}

.dropdown-menu a {
  color: var(--body-text);
}

.dropdown-menu a:hover {
  background-color: var(--accent-color);
  color: #fff; /* invert text for contrast */
}


/* Profile dropdown: image on top, rectangle */
.profile-info-vertical {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.profile-pic-rect {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 10px; /* rectangle shape */
}

.profile-text-vertical strong {
  display: block;
  font-size: 1rem;
}

.profile-text-vertical small {
  display: block;
  font-size: 0.8rem;
  color: var(--body-text);
}


.tile-link {
  text-decoration: none;
  display: block;
  height: 100%;
}

.tile {
  background: var(--tile-bg);
  color: var(--body-text);
  border-radius: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  height: 100%;
}

.tile:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  width: 60px;
  height: 60px;
  margin-bottom: 0.5rem;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
  transition: background 0.3s, color 0.3s, border 0.3s;
}

[data-bs-theme="dark"] .tile-icon {
  border: 1px solid rgba(255,255,255,0.2);
}

.tile:hover .tile-icon {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}
#install-app {
  border: 1px solid var(--accent-color);
  background: transparent;
  color: var(--accent-color);
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

#install-app:hover {
  background: var(--accent-color);
  color: #fff;
}

[data-bs-theme="dark"] #install-app {
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
}

/* Pulse animation */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(195, 111, 93, 0.7); /* fallback color */
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(195, 111, 93, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(195, 111, 93, 0);
  }
}

.scrollable-list {
  max-height: calc(100vh - 120px); 
  /*min-height: calc(100vh - 300px); */
  overflow-y: auto;
  padding-right: 8px;
  padding-left: 8px;
}

.bill-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.bill-name {
  font-weight: 600;  /* same as fw-bold */
  text-align: left;
}

.bill-mobile {
  font-size: 0.85rem;   /* smaller */
  color: var(--body-text);
  opacity: 0.7;         /* muted */
  text-align: right;
}

.tile2-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-color);
  color: #fff;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}


.step { display: none; }
.step.active { display: block; }
.form-control, .form-select { border-radius: 10px; }
canvas.signature-pad { border: 1px solid #ccc; border-radius: 8px; width: 100%; height: 150px; touch-action: none; }

.btn-theme {
  background: var(--accent-color);
  border: none;
  color: #fff;
}

.btn-theme:hover {
  opacity: 0.9;
}

.container {
    padding-left: 8px;
    padding-right: 8px;
    overflow: auto;
    flex: 1; 
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}