:root {
  --bg-color: #f5f5f5;
  --header-bg: #f5f5f5;
  --block-bg: rgba(255, 255, 255, 0.9);
  --primary: #004070;
  --accent: #e40000;
  --accent-hover: #c10000;
  --hover-bg: #cfd8e3;
}

/* Reset & Base (Keep as is) */
html {
  box-sizing: border-box;
  font-size: 16px;
  height: 100%;
}
*,
*::before,
*::after {
  box-sizing: inherit;
}
body {
  margin: 0;
  padding: 0;
  font-family: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

.portal-top-bar {
  width: 100%;
  background: var(--header-bg);
  padding: 15px;
  padding-bottom: 20px; 
}
header {
  display: flex;
  align-items: center;
  gap: 1rem;
}
header img {
  height: 3.5rem;
}
header h1 {
  margin: 0;
  font-size: clamp(1rem, 5vw, 2rem);
  color: var(--primary);
}

.page-content-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  width: 100%;
  padding: 0 10px;
}

.main-column {
  flex: 1 1 0;
  min-width: 0;
}

.calendar-column {
  flex: 0 0 360px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

#main-content {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: flex-start;
  width: 100%;
}

.group {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;             
}
.group-label {
  font-size: 1.3rem;
  font-weight: bold;
  margin-bottom: 10px;
  padding-left: 5px;
  color: var(--primary);
}
.group-blocks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}
.block {
  width: 95px;
  height: 95px;
  background: #fff;
  border-radius: 10px;
  padding: 4px 4px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12), 0 1.5px 4px rgba(0,0,0,0.10);
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform 0.2s, background-color 0.2s;
}
.block img {
  width: 38px;
  height: 38px;
  margin-bottom: 4px;
}
.block span {
  font-size: 1.1rem;
  padding: 0 2px;
  word-wrap: break-word;
}
.block:hover {
  transform: translateY(-5px) scale(1.05);
  background: var(--hover-bg);
}
.block:focus {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

#calendar-container {
  width: 360px;
  min-width: 240px;
  max-width: 100%;
  background: #fff;
  color: #222;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.12), 0 1.5px 4px rgba(0,0,0,0.10);
  border: 1px solid rgba(0,0,0,0.04);
  z-index: 99;
  overflow: hidden;
}
#calendar-container h2 {
  margin: 0 0 0.5rem;
  font-size: 1.18rem;
  color: var(--primary);
  font-weight: 700;
  text-align: center;
}
.cal-month-label {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1rem;
  color: var(--primary);
}
.cal-today {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: #333;
}
.cal-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.cal-list li {
  margin: 0.4rem 0;
  font-size: 0.95rem;
  color: #222;
}

@media (max-width: 900px) {
  .page-content-wrapper {
    flex-direction: column;
    gap: 20px;
    padding: 0 10px;
  }
  .calendar-column, #calendar-container {
    width: 100%;
    min-width: 0;
    align-items: center;
  }
}

@media (max-width: 600px) {
  /* Existing responsive styles for main content, already covered by 900px */
}

.helpdesk-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 123, 255, 0.85);
  color: #fff;
  font-size: 1.4rem;
  font-weight: 600;
  padding: 10px 20px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.2s, background-color 0.2s;
}
.helpdesk-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}
.helpdesk-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-hover);
}

.weather-widget {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}
.weather-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 20px;
  margin-bottom: 0.05rem;
}
.weather-date {
  font-size: 1.18rem;
  color: var(--primary);
  font-weight: 700;
  margin: 0 0 0.3rem 0 !important;
  text-align: center;
  flex: none;
  width: 100%;
  line-height: 1.1;
}
.weather-temp-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 100px;
  flex: 0 1 180px;
  max-width: 200px;
  width: 100%;
}
.weather-updated {
  font-size: 0.85rem;
  color: #aaa;
  margin-top: 0.1rem;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.weather-temp {
  font-size: 1.08rem;
  font-weight: 500;
  color: #222;
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: flex-end;
}
.weather-rain {
  font-size: 0.98rem;
  color: #555;
  font-style: italic;
  text-align: right;
  width: 100%;
}
.weather-location {
  font-size: 1.02rem;
  color: #444;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-align: right;
  margin-top: 0.05rem;
  opacity: 0.85;
  width: 100%;
}

.weather-date-row {
  width: 100%;
  text-align: center;
  margin-bottom: 0.2rem;
}
.weather-details-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 0.2rem;
}
.weather-left {
  flex: 0 0 auto;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.weather-right {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.1rem;
}
.cal-event-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 0.1rem;
  border-bottom: 1px dotted #e0e0e0;
  padding-bottom: 2px;
}
.cal-event-date {
  flex: 0 0 110px;
  text-align: right;
  font-weight: 500;
  color: #222;
  margin-right: 8px;
  white-space: nowrap;
  border-right: 1px solid #e0e0e0;
  padding-right: 8px;
}
.cal-event-title {
  flex: 1 1 0;
  text-align: left;
  color: #222;
  word-break: break-word;
  padding-left: 8px;
}

.weather-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.1rem;
  margin-bottom: 0.2rem;
}
.weather-table-left {
  width: 80px;
  text-align: right;
  vertical-align: top;
  padding-right: 10px;
}
.weather-table-right {
  text-align: left;
  vertical-align: top;
  padding-left: 4px;
}
.weather-updated {
  font-size: 0.85rem;
  color: #aaa;
  font-weight: 400;
  letter-spacing: 0.01em;
}
.weather-location {
  font-size: 1.02rem;
  color: #444;
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0.85;
}
.weather-rain {
  font-size: 0.98rem;
  color: #555;
  font-style: italic;
}

.cal-event-row3 {
  display: flex;
  align-items: flex-start;
  gap: 0.5em;
  margin-bottom: 0.1rem;
  border-bottom: 1px dotted #e0e0e0;
  padding-bottom: 2px;
}
.cal-event-month {
  flex: 0 0 2.5em;
  text-align: right;
  font-weight: 500;
  color: #555;
  letter-spacing: 0.03em;
}
.cal-event-day {
  flex: 0 0 2em;
  text-align: right;
  font-weight: 500;
  color: #222;
}
.cal-event-sep {
  flex: 0 0 1.2em;
  text-align: center;
  color: #bbb;
}
.cal-event-title {
  flex: 1 1 0;
  text-align: left;
  color: #222;
  word-break: break-word;
  padding-left: 0.5em;
}
.weather-table-left {
  width: 80px;
  text-align: right;
  vertical-align: top;
  padding-right: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.weather-temp-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.05rem;
}
.weather-temp {
  margin-bottom: 0;
}

.hourly-forecast {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-top: 6px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  padding: 0 8px;
  box-sizing: border-box;
}
.hour-col {
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 1px 4px #0001;
  padding: 4px 0;
  text-align: center;
  font-size: 12px;
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  margin: 0 2px;
  box-sizing: border-box;
}
.hour-time {
  font-weight: bold;
  font-size: 11px;
  margin-bottom: 0;
}
.hour-icon {
  font-size: 18px;
}
.hour-temp {
  color: #004070;
  font-weight: bold;
  font-size: 12px;
}
.hour-wind,
.hour-precip {
  font-size: 10px;
}
.weather-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.95em;
  color: #aaa;
  margin-top: 2px;
  margin-bottom: 2px;
  width: 100%;
  white-space: nowrap;
}
.weather-updated {
  color: #aaa;
  font-size: 0.95em;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0;
  white-space: nowrap;
}
.weather-location {
  color: #aaa;
  font-size: 0.95em;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0;
  white-space: nowrap;
}

.today-separator {
  border-bottom: 1px solid #e0e0e0;
  margin: 8px 0 10px 0;
  width: 100%;
}

.today-heading {
  margin-bottom: 8px;
}
.today-all-day-event {
  font-size: 1.05rem;
  color: #555;
  margin: 4px 0 8px 0;
  font-weight: bold;
  text-align: center;
  font-style: normal;
  letter-spacing: 0.01em;
}

.no-events-message {
  text-align: center;
  color: #888;
  font-size: 1.05rem;
  margin: 12px 0 16px 0;
  font-weight: 500;
}