* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #f3f4f6;
  color: #1f2937;
}

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.login-card {
  background: #fff;
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  width: 320px;
}

.login-card h1 {
  margin-top: 0;
  font-size: 1.4rem;
  text-align: center;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.login-card label {
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

input, textarea, select {
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 1rem;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 6px;
  padding: 0.55rem 1rem;
  font-size: 0.95rem;
  background: #2563eb;
  color: #fff;
}

button:hover {
  background: #1d4ed8;
}

#logout-btn, #cancel-btn {
  background: #6b7280;
}

#logout-btn:hover, #cancel-btn:hover {
  background: #4b5563;
}

.error {
  color: #dc2626;
  font-size: 0.85rem;
  min-height: 1.2em;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  padding: 1rem 1.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.app-header h1 {
  margin: 0;
  font-size: 1.3rem;
}

.header-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.app-main {
  padding: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.week-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.week-nav button {
  background: #e5e7eb;
  color: #1f2937;
}

#week-label {
  font-weight: 600;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.6rem;
  align-items: start;
}

.calendar-day {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.calendar-day.is-today {
  border: 2px solid #2563eb;
}

.calendar-day-header {
  padding: 0.6rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 8px 8px 0 0;
}

.calendar-day-name {
  font-size: 0.8rem;
  color: #6b7280;
  text-transform: uppercase;
}

.calendar-day-date {
  font-weight: 600;
  font-size: 0.95rem;
}

.calendar-day-events {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.5rem;
}

.event-card {
  background: #eff6ff;
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
  border-left: 3px solid #2563eb;
}

.event-card .event-time {
  font-size: 0.75rem;
  color: #6b7280;
}

.event-card .event-status {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1d4ed8;
}

.calendar-day-empty {
  color: #9ca3af;
  font-size: 0.8rem;
  text-align: center;
  padding-top: 0.5rem;
}

@media (max-width: 900px) {
  .calendar-grid {
    grid-template-columns: 1fr;
  }
}

.event-card .event-title {
  font-weight: 600;
  margin: 0.15rem 0;
}

.empty-state {
  text-align: center;
  color: #6b7280;
  padding: 2rem 0;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.modal {
  background: #fff;
  padding: 1.5rem;
  border-radius: 10px;
  width: 360px;
}

.modal h2 {
  margin-top: 0;
}

.modal form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal label {
  font-size: 0.85rem;
  margin-top: 0.4rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}
