* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0033A0;
  min-height: 100vh;
  padding: 20px;
  color: #2c2c2c;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid #e0e0e0;
}

header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #0033A0;
}

h1 {
  color: #0033A0;
  margin-bottom: 10px;
  font-weight: 500;
}

#user-status {
  color: #555;
  font-size: 14px;
}

.section {
  margin-bottom: 30px;
}

h2 {
  color: #0033A0;
  margin-bottom: 15px;
  font-size: 20px;
  font-weight: 500;
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
  color: #2c2c2c;
  font-weight: 500;
}

input[type="email"],
input[type="password"],
input[type="text"],
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #d0d0d0;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Roboto', sans-serif;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #0033A0;
  box-shadow: 0 0 0 2px rgba(0, 51, 160, 0.1);
}

textarea {
  min-height: 80px;
  resize: vertical;
}

button {
  background: #0033A0;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s, transform 0.1s;
  margin-right: 10px;
}

button:hover {
  background: #002780;
}

button:active {
  transform: translateY(1px);
}

.login-box {
  max-width: 400px;
  margin: 0 auto;
  padding: 30px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid #e0e0e0;
}

.dashboard-header h2 {
  margin: 0;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

#admin-menu {
  display: flex;
  gap: 8px;
}

#admin-menu button {
  margin: 0;
  padding: 8px 16px;
  font-size: 14px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

#admin-menu button:hover {
  opacity: 1;
}

.dashboard-header button {
  margin: 0;
}

h3 {
  color: #0033A0;
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 15px;
}

.form-box {
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.form-box h3 {
  margin-bottom: 15px;
  color: #0033A0;
  font-size: 16px;
  font-weight: 500;
}

#auth-section {
  max-width: 500px;
  margin: 0 auto;
}

#app-section {
  display: none;
}

/* Calendar Styles */
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.calendar-header h3 {
  margin: 0;
  font-size: 20px;
  color: #0033A0;
}

.nav-btn {
  background: white;
  color: #0033A0;
  border: 1px solid #0033A0;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s;
  margin: 0;
}

.nav-btn:hover {
  background: #0033A0;
  color: white;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}

.weekday {
  text-align: center;
  font-weight: 500;
  color: #0033A0;
  padding: 10px;
  font-size: 14px;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-day {
  min-height: 80px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.calendar-day:hover {
  background: #e9ecef;
  border-color: #0033A0;
}

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

.calendar-day.empty:hover {
  background: transparent;
}

.calendar-day.today {
  background: #e3f2fd;
  border: 2px solid #0033A0;
  font-weight: 500;
}

.calendar-day.has-events {
  background: #cce5ff;
}

.day-number {
  font-weight: 500;
  color: #2c2c2c;
  margin-bottom: 5px;
}

.event-badge {
  position: absolute;
  top: 5px;
  right: 5px;
  background: #0033A0;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

@media (max-width: 768px) {
  .calendar-day {
    min-height: 60px;
    padding: 5px;
  }
  
  .weekday {
    font-size: 12px;
    padding: 5px;
  }
  
  .day-number {
    font-size: 13px;
  }
  
  .event-badge {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 2px solid #0033A0;
  background: #f8f9fa;
}

.modal-header h3 {
  margin: 0;
  color: #0033A0;
  font-size: 20px;
}

.close-btn {
  font-size: 32px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s;
}

.close-btn:hover {
  color: #0033A0;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.team-section {
  margin-bottom: 25px;
}

.team-header {
  font-size: 18px;
  font-weight: 500;
  color: #0033A0;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e0e0e0;
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-item {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 6px;
  border-left: 4px solid #0033A0;
  display: flex;
  gap: 12px;
  align-items: center;
}

.event-time {
  font-weight: 500;
  color: #0033A0;
  min-width: 70px;
  font-size: 14px;
}

.event-details {
  flex: 1;
  color: #2c2c2c;
  font-size: 14px;
}

.request-btn {
  background: #0033A0;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.request-btn:hover {
  background: #002280;
}

.request-btn:active {
  background: #001960;
}

.team-select {
  padding: 8px 12px;
  border: 1px solid #0033A0;
  border-radius: 4px;
  font-size: 14px;
  color: #0033A0;
  background: white;
  cursor: pointer;
  transition: border-color 0.2s;
}

.team-select:hover {
  border-color: #002280;
}

.team-select:focus {
  outline: none;
  border-color: #0033A0;
  box-shadow: 0 0 0 2px rgba(0, 51, 160, 0.1);
}

/* Team Selection Modal */
.team-selection-modal {
  padding: 20px;
}

.team-selection-dropdown {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  color: #2c2c2c;
  background: white;
  cursor: pointer;
  transition: border-color 0.2s;
}

.team-selection-dropdown:hover {
  border-color: #0033A0;
}

.team-selection-dropdown:focus {
  outline: none;
  border-color: #0033A0;
  box-shadow: 0 0 0 2px rgba(0, 51, 160, 0.1);
}

.event-description {
  font-size: 13px;
  color: #666;
  margin-top: 4px;
}

.document-item p {
  margin-bottom: 8px;
  font-size: 14px;
  color: #2c2c2c;
}

.document-item button {
  background: #dc3545;
  margin: 0;
  padding: 5px 15px;
  font-size: 12px;
  border-radius: 6px;
}

.document-item button:hover {
  background: #c82333
}

.document-item button:hover {
  background: #c0392b;
}

#documents-list {
  margin-top: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .container {
    padding: 20px 15px;
    border-radius: 6px;
  }

  header {
    margin-bottom: 20px;
    padding-bottom: 15px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 18px;
  }

  h3 {
    font-size: 16px;
  }

  .section {
    margin-bottom: 20px;
  }

  .login-box {
    padding: 20px;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .dashboard-header button {
    width: 100%;
  }

  button {
    width: 100%;
    margin-right: 0;
    margin-bottom: 10px;
  }

  .nav-btn {
    width: auto;
    margin-bottom: 0;
  }

  .calendar-header {
    padding: 12px;
  }

  .calendar-header h3 {
    font-size: 18px;
  }

  .nav-btn {
    padding: 6px 12px;
    font-size: 18px;
  }

  .weekday {
    font-size: 12px;
    padding: 5px 2px;
  }

  .calendar-days {
    gap: 4px;
  }

  .calendar-day {
    min-height: 60px;
    padding: 5px;
  }

  .day-number {
    font-size: 13px;
  }

  .event-badge {
    width: 20px;
    height: 20px;
    font-size: 11px;
    top: 3px;
    right: 3px;
  }

  .modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .modal-header {
    padding: 15px;
  }

  .modal-header h3 {
    font-size: 18px;
  }

  .close-btn {
    font-size: 28px;
  }

  .modal-body {
    padding: 15px;
  }

  .team-section {
    margin-bottom: 20px;
  }

  .team-header {
    font-size: 16px;
  }

  .event-item {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }

  .event-time {
    min-width: auto;
    font-size: 13px;
  }

  .event-details {
    font-size: 13px;
  }

  input[type="email"],
  input[type="password"],
  input[type="text"],
  textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 20px;
  }

  .container {
    padding: 15px 10px;
  }

  .calendar-day {
    min-height: 50px;
    padding: 3px;
  }

  .day-number {
    font-size: 12px;
  }

  .event-badge {
    width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .weekday {
    font-size: 11px;
    padding: 3px 1px;
  }
}

/* Admin Pages Styles */
.requested-event-item,
.user-item {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 6px;
  border-left: 4px solid #0033A0;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.event-info,
.user-info {
  flex: 1;
}

.event-title,
.user-email {
  font-weight: 500;
  color: #0033A0;
  margin-bottom: 6px;
  font-size: 16px;
}

.event-meta,
.user-meta {
  font-size: 14px;
  color: #666;
  margin-bottom: 4px;
}

.event-actions {
  display: flex;
  gap: 8px;
}

.approve-btn,
.deny-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.approve-btn {
  background: #28a745;
  color: white;
}

.approve-btn:hover {
  background: #218838;
}

.deny-btn {
  background: #dc3545;
  color: white;
}

.deny-btn:hover {
  background: #c82333;
}

.admin-badge {
  display: inline-block;
  background: #ffc107;
  color: #000;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-left: 8px;
}

#requested-events-list p,
#users-list p {
  text-align: center;
  color: #666;
  padding: 20px;
}

/* Add Event Form Styles */
.add-event-form {
  padding: 20px;
}

.add-event-form .form-group {
  margin-bottom: 15px;
}

.add-event-form label {
  display: block;
  margin-bottom: 5px;
  color: #0033A0;
  font-weight: 500;
  font-size: 14px;
}

.add-event-form input[type="text"],
.add-event-form input[type="time"],
.add-event-form select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.add-event-form input[type="text"]:focus,
.add-event-form input[type="time"]:focus,
.add-event-form select:focus {
  outline: none;
  border-color: #0033A0;
}

.add-event-btn {
  background: #0033A0;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.add-event-btn:hover {
  background: #002280;
}

.calendar-day {
  cursor: pointer;
}
