body { font-family: Arial, sans-serif; text-align: center; padding: 0px; margin: 0; min-height: 100vh; display: flex; flex-direction: column; }

/* Global link styling: no underline and inherit color */
a, a:visited, a:active {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}

.navbar { background-color: #36454F; padding: 10px; position: fixed; top: 0; width: 100%; z-index: 1000; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 10px; box-sizing: border-box; flex-wrap: nowrap; }
.navbar-left { display: flex; align-items: center; }
.navbar-left form { margin: 0; }
.navbar-right { display: flex; align-items: center; }
.navbar-hamburger { position: relative; display: flex; align-items: center; }
.hamburger { font-size: 24px; line-height: 1; background: transparent; border: none; color: white; padding: 8px; cursor: pointer; border-radius: 6px; position: relative; }

.hamburger .notif-dot { position: absolute; top: 4px; right: 4px; width: 10px; height: 10px; border-radius: 50%; background: #e74c3c; border: 2px solid rgba(255,255,255,0.8); }
.hamburger:hover { background: rgba(255,255,255,0.12); }
.hamburger-menu { position: absolute; top: calc(100% + 6px); right: 0; background: #36454F; border: 1px solid #555; border-radius: 8px; display: none; flex-direction: column; min-width: 220px; padding: 8px; box-shadow: 0 8px 16px rgba(0,0,0,0.3); z-index: 1100; }
.hamburger-menu.show { display: flex; }
.hamburger-menu .divider { height: 1px; background: rgba(255,255,255,0.2); margin: 8px 0; }
.hamburger-menu a { margin: 0 0 6px 0; display: flex; align-items: center; gap: 10px; }
.hamburger-menu a .menu-icon { width: 18px; height: 18px; fill: currentColor; }
.menu-profile { display: flex; align-items: center; padding: 8px 12px; border-radius: 8px; gap: 10px; margin-bottom: 8px; background: rgba(255,255,255,0.08); }
.menu-profile { display: flex; align-items: center; gap: 8px; }
.menu-profile .menu-username { font-weight: 600; color: #fff; }
.menu-profile .menu-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px; background: #e74c3c; border: 2px solid rgba(255,255,255,0.8); color: white; font-size: 11px; font-weight: 700; line-height: 18px; white-space: nowrap; }
.menu-profile .menu-badge:empty { display: none; }

.menu-item.menu-notifications { position: relative; }
.menu-item.menu-notifications .notif-badge { position: absolute; top: 10px; right: 12px; display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 6px; border-radius: 999px; background: #e74c3c; color: white; font-size: 11px; font-weight: 700; line-height: 18px; white-space: nowrap; }
.menu-item.menu-notifications .notif-badge:empty { display: none; }
.menu-profile .menu-username { font-weight: 600; color: #fff; }
.hamburger-menu a .avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.2); color: white; font-size: 13px; font-weight: 600; border: 2px solid transparent; box-sizing: border-box; }
.hamburger-menu a .avatar.active { border-color: #00e676; box-shadow: 0 0 0 3px rgba(0, 230, 118, 0.3); }
.hamburger-menu a .menu-label { flex: 1; text-align: left; }
.navbar a, .navbar button { color: white; text-decoration: none; padding: 10px 20px; margin: 0; background-color: #555; border: none; border-radius: 5px; cursor: pointer; }
.navbar a:hover, .navbar button:hover { background-color: #777; }
.navbar .logout { background-color: #dc3545; }
.navbar .logout:hover { background-color: #c82333; }
.content { margin-top: 0; padding-top: 80px; box-sizing: border-box; flex: 1; }
.button { display: inline-block; padding: 10px 20px; background-color: #007bff; color: white; text-decoration: none; border-radius: 5px; margin: 10px; }
.button:hover { background-color: #0056b3; }
.site-footer { margin-top: auto; padding: 12px 16px; background-color: #f1f1f1; color: #333; border-top: 1px solid #ddd; }
.site-footer p { margin: 0; font-size: 14px; }
.theme-toggle { margin-left: 16px; padding: 6px 16px; border-radius: 5px; border: none; background: #e0e0e0; color: #333; cursor: pointer; font-size: 13px; }
.theme-toggle:hover { background: #bbb; }
.theme-switch {
  display: inline-flex;
  align-items: center;
  margin-left: 16px;
}
.theme-switch input[type="checkbox"] {
  display: none;
}
.theme-switch .slider {
  width: 40px;
  height: 20px;
  background: #e0e0e0;
  border-radius: 20px;
  position: relative;
  transition: background 0.3s;
  margin-right: 8px;
  cursor: pointer;
}
.theme-switch .slider:before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 1px;
  top: 1px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.theme-switch input[type="checkbox"]:checked + .slider {
  background: #444;
}
.theme-switch input[type="checkbox"]:checked + .slider:before {
  transform: translateX(20px);
}
.theme-switch .theme-label {
  font-size: 13px;
  color: #333;
}
[data-footer-theme="dark"] .site-footer { background-color: #23272f; color: #f1f1f1; border-top: 1px solid #444; }
[data-footer-theme="dark"] .site-footer p { color: #f1f1f1; }
[data-footer-theme="dark"] .theme-toggle { background: #444; color: #f1f1f1; }
[data-footer-theme="dark"] .theme-toggle:hover { background: #222; }
[data-footer-theme="dark"] .theme-switch .theme-label {
  color: #f1f1f1;
}
.login-page { background-color: #f5f5f5; }
.main-content { flex: 1; display: flex; justify-content: center; align-items: center; padding: 20px; }
.login-container { background: white; padding: 30px; border-radius: 8px; box-shadow: 0 0 10px rgba(0,0,0,0.1); width: 320px; }
.login-container h1 { text-align: center; color: #333; margin-bottom: 20px; }
.login-container form { display: flex; flex-direction: column; }
.login-container input { margin-bottom: 12px; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.login-container button { padding: 10px; background-color: #007bff; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 15px; }
.login-container button:hover { background-color: #0056b3; }
.error { color: red; text-align: center; margin-bottom: 12px; font-size: 14px; }
.landing-box { background: white; padding: 40px; border-radius: 8px; box-shadow: 0 0 10px rgba(0,0,0,0.1); display: inline-block; margin-top: 40px; min-width: 300px; }
.landing-box h1 { color: #36454F; margin-bottom: 10px; }
.landing-box p { color: #666; margin-bottom: 24px; }
.error-page .error-content { flex: 1; padding: 50px; }
.error-page h1 { color: #d9534f; }

body[data-footer-theme="dark"] {
  background-color: #23232b;
  color: #e0d7ff;
}

[data-footer-theme="dark"] .site-footer {
  background-color: #2d223a;
  color: #e0d7ff;
  border-top: 1px solid #5a3e7a;
}
[data-footer-theme="dark"] .site-footer p {
  color: #e0d7ff;
}
[data-footer-theme="dark"] .theme-toggle, [data-footer-theme="dark"] .theme-switch .slider {
  background: #5a3e7a;
  color: #e0d7ff;
}
[data-footer-theme="dark"] .theme-toggle:hover, [data-footer-theme="dark"] .theme-switch .slider:hover {
  background: #43215a;
}
[data-footer-theme="dark"] .theme-switch .theme-label {
  color: #e0d7ff;
}
[data-footer-theme="dark"] .navbar {
  background-color: #2d223a;
}
[data-footer-theme="dark"] .navbar a, [data-footer-theme="dark"] .navbar button {
  background-color: #5a3e7a;
  color: #e0d7ff;
}
[data-footer-theme="dark"] .navbar a:hover, [data-footer-theme="dark"] .navbar button:hover {
  background-color: #43215a;
}
[data-footer-theme="dark"] .navbar .logout {
  background-color: #a259e6;
}
[data-footer-theme="dark"] .navbar .logout:hover {
  background-color: #7c3fa6;
}
[data-footer-theme="dark"] .login-container {
  background: #2d223a;
  color: #e0d7ff;
  box-shadow: 0 0 10px rgba(90,62,122,0.2);
}
[data-footer-theme="dark"] .login-container h1 {
  color: #a259e6;
}
[data-footer-theme="dark"] .login-container button {
  background-color: #5a3e7a;
  color: #e0d7ff;
}
[data-footer-theme="dark"] .login-container button:hover {
  background-color: #43215a;
}
[data-footer-theme="dark"] .landing-box {
  background: #2d223a;
  color: #e0d7ff;
  box-shadow: 0 0 10px rgba(90,62,122,0.2);
}
[data-footer-theme="dark"] .landing-box h1 {
  color: #a259e6;
}
[data-footer-theme="dark"] .landing-box p {
  color: #c2a6e6;
}
[data-footer-theme="dark"] .error-page h1 {
  color: #a259e6;
}

/* Apply dark/light theme to all elements */
[data-footer-theme="dark"] body,
[data-footer-theme="dark"] .content,
[data-footer-theme="dark"] .main-content,
[data-footer-theme="dark"] .error-page,
[data-footer-theme="dark"] .error-content,
[data-footer-theme="dark"] .login-page,
[data-footer-theme="dark"] .login-container,
[data-footer-theme="dark"] .landing-box {
  background-color: #23232b !important;
  color: #e0d7ff !important;
}
[data-footer-theme="dark"] input,
[data-footer-theme="dark"] textarea,
[data-footer-theme="dark"] select {
  background: #2d223a !important;
  color: #e0d7ff !important;
  border-color: #5a3e7a !important;
}
[data-footer-theme="dark"] .button,
[data-footer-theme="dark"] .login-container button {
  background-color: #5a3e7a !important;
  color: #e0d7ff !important;
}
[data-footer-theme="dark"] .button:hover,
[data-footer-theme="dark"] .login-container button:hover {
  background-color: #43215a !important;
}
[data-footer-theme="dark"] .error-page h1 {
  color: #a259e6 !important;
}

/* Calendar styles */
.calendar {
  max-width: 980px;
  margin: 0 auto;
  font-family: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,0.12), rgba(255,255,255,0.05));
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 22px 60px rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.15);
}
.calendar-grid { display: grid; gap: 12px; }
.calendar-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.calendar-cell {
  min-height: 110px;
  background: rgba(255,255,255,0.10);
  border-radius: 16px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.18);
  box-sizing: border-box;
  transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.calendar-cell:hover {
  background: rgba(255,255,255,0.18);
  transform: translateY(-4px);
  box-shadow: 0 14px 25px rgba(0,0,0,0.2);
}
.calendar-cell-date {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
}
.calendar-events {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}
.calendar-event {
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  padding: 4px 8px;
  font-size: 0.82rem;
  line-height: 1.2;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calendar-event:hover {
  background: rgba(0,0,0,0.1);
}
.calendar-event .event-time {
  color: rgba(0,0,0,0.55);
  margin-right: 6px;
  font-weight: 600;
}
.calendar-event .event-title {
  font-weight: 600;
}
.calendar-event-more {
  color: rgba(0,0,0,0.65);
  font-style: italic;
}
.calendar-cell.header-cell {
  background: rgba(255,255,255,0.22);
  font-weight: 700;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.30);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
  padding: 10px 8px;
  min-height: 54px;
}
.calendar-outside { opacity: 0.55; }
.calendar-today {
  border-color: #00e676;
  box-shadow: 0 0 0 5px rgba(0,230,118,0.35);
}
.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 16px;
}
.calendar-navigation {
  display: flex;
  align-items: center;
  gap: 10px;
}
.calendar-title {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0.9px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
.calendar-views {
  display: flex;
  align-items: center;
  gap: 10px;
}
.calendar-page .button { padding: 10px 16px; }
.calendar-page .button.active {
  background-color: rgba(0, 230, 118, 0.90);
  box-shadow: 0 10px 20px rgba(0,230,118,0.3);
}
.calendar-day-content {
  margin-top: 10px;
  color: rgba(255,255,255,0.9);
  font-size: 0.98rem;
}

/* Calendar + Event panel layout */
.calendar-layout {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}

.event-panel {
  width: min(420px, 100%);
  background: rgba(255,255,255,0.92);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 18px 42px rgba(0,0,0,0.24);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.event-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.event-panel-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.modal-close {
  appearance: none;
  border: none;
  background: transparent;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: #333;
}

.event-panel-body {
  padding: 14px 18px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.event-panel-footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-label {
  font-weight: 600;
  color: rgba(0,0,0,0.75);
}

.modal-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.modal-form input,
.modal-form textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.15);
  font-size: 0.95rem;
  resize: vertical;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
}

.event-panel.hidden {
  display: none;
}

.muted { color: rgba(0,0,0,0.6); }

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  min-width: 260px;
  max-width: 320px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-size: 0.95rem;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 240ms ease, transform 240ms ease;
  z-index: 1300;
}

.toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.toast.success { background: rgba(0, 160, 100, 0.92); }
.toast.error { background: rgba(180, 40, 40, 0.92); }
