/* =========================
   GLOBAL BASE STYLES
========================= */

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f6f8;
  color: #222;
}

h1, h2, h3 {
  margin: 0 0 10px;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 4px;
  padding: 8px 14px;
  font-size: 14px;
}

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

#app {
  display: flex;
  gap: 20px;
  padding: 20px;
}

#calendar {
  flex: 3;
  background: white;
  padding: 10px;
  border-radius: 6px;
}

#summary {
  flex: 1;
  background: white;
  padding: 15px;
  border-radius: 6px;
}

#summaryList {
  list-style: none;
  padding: 0;
  margin: 0;
}

#summaryList li {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #eee;
}

#summaryTotal {
  margin-top: 10px;
  font-weight: bold;
}

/* =========================
   FULLCALENDAR OVERRIDES
========================= */

/* Remove default blue background */
.fc-daygrid-event {
  background-color: transparent;
  border: none;
}

/* Claim = RED */
.fc-daygrid-event.claim {
  background-color: #c0392b !important;
  border: 1px solid #c0392b !important;
  color: white !important;
  border-radius: 4px;
  padding: 2px 4px;
}

/* Paid = GREEN */
.fc-daygrid-event.paid {
  background-color: #27ae60 !important;
  border: 1px solid #27ae60 !important;
  color: white !important;
  border-radius: 4px;
  padding: 2px 4px;
  font-weight: bold;
}

/* Center text inside event */
.fc-daygrid-event .fc-event-title {
  text-align: center;
}

/* =========================
   FULL DAY CELL COLORS
========================= */

/* Entire day square - CLAIM */
.fc-daygrid-day.day-claim {
  background-color: rgba(192, 57, 43, 0.15);
}

/* Entire day square - PAID */
.fc-daygrid-day.day-paid {
  background-color: rgba(39, 174, 96, 0.15);
}

/* Keep day number readable */
.fc-daygrid-day.day-claim .fc-daygrid-day-number,
.fc-daygrid-day.day-paid .fc-daygrid-day-number {
  font-weight: bold;
}

/* =========================
   MODAL STYLES
========================= */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 6px;
  width: 240px;
  text-align: center;
}

.modal-content h3 {
  margin-bottom: 15px;
}

.claim-btn {
  background-color: #c0392b;
  color: white;
  width: 100%;
  margin-bottom: 10px;
}

.paid-btn {
  background-color: #27ae60;
  color: white;
  width: 100%;
  margin-bottom: 10px;
}

.clear-btn {
  background-color: #7f8c8d;
  color: white;
  width: 100%;
  margin-bottom: 10px;
}

.cancel-btn {
  background-color: #bdc3c7;
  width: 100%;
}

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

@media (max-width: 800px) {
  #app {
    flex-direction: column;
  }
}
/* =========================
   MONTHLY LOG TABLE
========================= */

#monthlyLog {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 14px;
}

#monthlyLog thead th {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: #666;
  background: #f8f9fb;
  padding: 8px;
  border-bottom: 2px solid #e0e0e0;
}

#monthlyLog tbody tr {
  border-bottom: 1px solid #eee;
}

#monthlyLog tbody tr:last-child {
  border-bottom: none;
}

#monthlyLog td {
  padding: 8px;
  vertical-align: middle;
}

/* Status text */
.status-paid {
  color: #27ae60;        /* Green */
  font-weight: 600;
}

.status-claimed {
  color: #c0392b;        /* Red */
  font-weight: 600;
}

/* Subtle hover for readability */
#monthlyLog tbody tr:hover {
  background-color: #f5f6f8;
}
