/* ============================================================
   REAL TREE GUY OS — CALENDAR (REBUILT)
   Forestry Theme • Cinematic • Phone Friendly
============================================================ */

*, *::before, *::after { box-sizing: border-box; }

/* BACKGROUND */
body {
  background: #0d0f0d url("../../assets/icons/rtg-192.png") center/35% no-repeat fixed;
  color: #e8ffe8;
  font-family: system-ui, Arial, sans-serif;
  margin: 0;
  padding: 0;
}

/* ============================================================
   HEADER
============================================================ */
header {
  text-align: center;
  padding: 22px 16px;
  border-bottom: 2px solid #2e6b33;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
}

header h1 {
  font-size: 2.1rem;
  color: #caffca;
  margin: 0;
  letter-spacing: 0.03em;
  text-shadow: 0 0 8px #000;
}

.back-link {
  display: inline-block;
  margin-top: 10px;
  color: #a8ffa8;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
}

/* ============================================================
   QUICK ACTIONS
============================================================ */
.quick-actions {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  overflow-x: auto;
}

.qa-btn {
  flex: 0 0 auto;
  padding: 10px 16px;
  background: #ff8c42;
  border: none;
  border-radius: 10px;
  color: #000;
  font-weight: 800;
  cursor: pointer;
  font-size: 0.95rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.4);
  transition: 0.2s ease;
}

.qa-btn:hover {
  background: #ffa45f;
  transform: translateY(-2px);
}

/* ============================================================
   MONTH NAVIGATION
============================================================ */
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 16px;
}

.cal-nav button {
  padding: 10px 20px;
  background: #2e6b33;
  border: none;
  color: #e8ffe8;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition: 0.2s ease;
}

.cal-nav button:hover {
  background: #3fa63f;
  transform: translateY(-2px);
}

#monthLabel {
  font-size: 1.5rem;
  font-weight: 900;
  color: #caffca;
  min-width: 200px;
  text-align: center;
  letter-spacing: 0.03em;
}

/* ============================================================
   CALENDAR GRID
============================================================ */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 12px 40px;
}

.cal-day-label {
  text-align: center;
  font-size: 0.85rem;
  font-weight: bold;
  color: #6aff6a;
  padding: 6px 0;
  text-transform: uppercase;
}

.cal-day {
  min-height: 90px;
  background: rgba(20,35,20,0.85);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  border: 1px solid #1e4a1e;
  transition: 0.15s ease;
  display: flex;
  flex-direction: column;
}

.cal-day:hover {
  background: rgba(40,70,40,0.95);
  border-color: #3fa63f;
}

.cal-day .num {
  font-size: 0.9rem;
  font-weight: bold;
  color: #caffca;
}

.cal-day.today {
  border-color: #6aff6a;
  background: rgba(30,80,30,0.9);
  box-shadow: 0 0 10px #6aff6a;
}

.cal-day.empty {
  background: transparent;
  border: none;
  cursor: default;
}

/* ============================================================
   EVENT PILLS
============================================================ */
.event-pill {
  background: #2e6b33;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 0.75rem;
  margin-top: 4px;
  color: #e8ffe8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  font-weight: 600;
}

.event-pill.contract { background: #1a4f8c; }
.event-pill.bid { background: #6b3b2e; }
.event-pill.reminder { background: #b59b00; }

/* ============================================================
   EVENT DOTS (Optional)
============================================================ */
.event-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 4px;
}

.dot-task { background: #4caf50; }
.dot-contract { background: #ff8c42; }
.dot-bid { background: #42a5f5; }
.dot-reminder { background: #ffeb3b; }

/* ============================================================
   MODAL
============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

.modal-box {
  background: #0d1f0d;
  border: 2px solid #2e6b33;
  border-radius: 16px;
  padding: 28px;
  width: 90%;
  max-width: 460px;
  box-shadow: 0 0 18px rgba(0,0,0,0.7);
}

.modal-box h2 {
  color: #caffca;
  margin-top: 0;
  font-size: 1.4rem;
}

label {
  display: block;
  margin-top: 14px;
  font-size: 1rem;
  color: #a8ffa8;
}

input, select, textarea {
  width: 100%;
  padding: 12px;
  margin-top: 6px;
  border-radius: 10px;
  border: 1px solid #2e6b33;
  background: rgba(20,40,20,0.9);
  color: #e8ffe8;
  font-size: 1rem;
}

textarea { height: 90px; }

.hidden { display: none; }

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.modal-actions button {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
}

#saveEvent {
  background: #2e6b33;
  color: #e8ffe8;
}

#saveEvent:hover {
  background: #3fa63f;
}

#closeModal {
  background: rgba(255,255,255,0.1);
  color: #e8ffe8;
}

#closeModal:hover {
  background: rgba(255,255,255,0.2);
}
