/* ===== GLOBAL ===== */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background:#eef2f7;
  margin: 0;
  padding: 0;
}

h2, h3, h4 {
  margin: 5px 0;
}

/* ===== CONTAINER ===== */
.container, .excontainer {
  padding: 15px;
  max-width: 500px;
  margin: auto;
}

/* ===== CARD (LOGIN) ===== */
.card {
  background: white;
  padding: 20px;
  border-radius: 16px;
  width: 260px;
  margin: 120px auto;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* ===== INPUT ===== */
input {
  width: 94%;
  padding: 12px;
  margin: 8px 0;
  border-radius: 8px;
  border: 1px solid #ddd;
  outline: none;
}

input:focus {
  border-color: #007bff;
}

/* ===== BUTTON ===== */
button {
  width: 98%;
  padding: 12px;
  margin-top: 8px;
    margin-left: 5px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(45deg, #007bff, #00c6ff);
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s;
}

button:hover {
  transform: scale(1.03);
}

.rejectInviteButton {
    margin-left: 5px;
    background: linear-gradient(45deg, #A30B0B, #ED5377);
}

/* ===== HEADER BAR ===== */
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

#username {
  font-size: 22px;
  font-weight: bold;
}

/* ===== ACTION BUTTONS ===== */
.action-bar {
  display: flex;
  gap: 10px;
  margin: 10px 0;
}

/* ===== SPECIAL BUTTONS ===== */
.logout-btn {
  width: auto !important;
  padding: 6px 12px;
  background: #ff4d4f;
  border-radius: 6px;
  font-size: 12px;
}

.invite-btn {
  width: auto !important;
  padding: 6px 12px;
  background: #28a745;
  border-radius: 6px;
  font-size: 12px;
}

/* ===== USER / GROUP CARD ===== */
.user, .user-card {
  background: white;
  padding: 14px;
  margin: 10px 0;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: 0.2s;
  cursor: pointer;
}

.user:hover, .user-card:hover {
  transform: translateY(-2px);
}

.user .info {
  flex: 1;
}

.user strong, .user-card strong {
  font-size: 16px;
  color: #333;
}

/* ===== BALANCE COLORS ===== */
.green { color: green; }
.red { color: #ff4d4f; }

/* ===== TOGGLE SWITCH ===== */
.toggle-box {
  margin-left: 10px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  inset: 0;
  background-color: #ccc;
  border-radius: 22px;
  transition: 0.3s;
}

.slider:before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

.switch input:checked + .slider {
  background-color: #28a745;
}

.switch input:checked + .slider:before {
  transform: translateX(18px);
}

/* ===== POPUP ===== */
.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(3px);
}

.popup-content {
  position: relative;
  background: white;
  padding: 20px;
  margin: 60px auto;
  width: 90%;
  max-width: 350px;
  border-radius: 16px;
  max-height: 85vh;
  overflow-y: auto;
  animation: fadeIn 0.3s ease;
}

/* ===== CLOSE BUTTON ===== */
.close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 18px;
  cursor: pointer;
  color: #999;
}

.close-btn:hover {
  color: #ff4d4f;
}

/* ===== CHECKBOX LIST ===== */
#checks {
  margin-top: 10px;
}

.user-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  margin: 4px 0;
  background: #f7f9fc;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
}

.user-option input {
  width: 16px;
  height: 16px;
}

.user-option:hover {
  background: #e6f0ff;
}

/* ===== EXPENSES ===== */
.excard {
  background:#fff;
  padding:12px;
  margin:10px 0;
  border-radius:12px;
  box-shadow:0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: 0.2s;
}

.excard:hover {
  transform: translateY(-2px);
}

.examount {
  font-weight:bold;
  color:#ff4d4f;
}

/* ===== EXPENSE POPUP ===== */
.expopup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}

.expopup-content {
  position: relative;
  background: white;
  padding: 20px;
  margin: 100px auto;
  width: 300px;
  border-radius: 12px;
}

.exclose-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 18px;
  cursor: pointer;
  color: #999;
}

.exclose-btn:hover {
  color: #ff4d4f;
}

/* ===== SPLIT LIST ===== */
.exuser-card {
  background: #f7f9fc;
  padding: 10px;
  margin: 6px 0;
  border-radius: 8px;
}

/* ===== PAGINATION ===== */
#pagination {
  text-align: center;
  margin-top: 15px;
}

#pagination button {
  width: auto;
  padding: 8px 12px;
  margin: 3px;
  border-radius: 6px;
  background: #ddd;
  color: #333;
}

#pagination button:hover {
  background: #007bff;
  color: white;
}

#pagination button.active {
  background: #007bff;
  color: white;
}

/* ===== DATE ===== */
small {
  color: #777;
  font-size: 12px;
}

/* ===== ANIMATION ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* ===== PENDING ===== */
.badge {
  background: red;
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 12px;
  margin-left: 5px;
}