:root {
  --primary: #0b5ed7;
  --secondary: #0f172a;
  --text-dark: #111827;
  --text-light: #f8fafc;
  --surface: #ffffff;
  --bg-soft: #f4f7fb;
}

body.theme-dark {
  --text-dark: #e5e7eb;
  --surface: #0f172a;
  --bg-soft: #020617;
}

@media (prefers-color-scheme: dark) {
  body.theme-system {
    --text-dark: #e5e7eb;
    --surface: #0f172a;
    --bg-soft: #020617;
  }
}

html,
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body {
  font-family: 'Space Grotesk', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--text-dark);
  background: radial-gradient(circle at 10% 0%, #e5efff 0%, #f7f9fc 35%, #ffffff 70%);
  min-height: 100vh;
}

.form-control[type="file"]::file-selector-button {
  border: 1px solid rgba(15, 23, 42, 0.2);
  background: #eef2ff;
  color: #0f172a;
}

.navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 0.35rem;
  flex: 0 0 auto;
}

body.theme-dark {
  background: radial-gradient(circle at 10% 0%, #0f172a 0%, #020617 45%, #020617 100%);
}

@media (prefers-color-scheme: dark) {
  body.theme-system {
    background: radial-gradient(circle at 10% 0%, #0f172a 0%, #020617 45%, #020617 100%);
  }
}

.modal-dialog-scrollable .modal-body {
  max-height: calc(100vh - 11rem);
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  -ms-overflow-style: auto;
}

.modal-dialog-scrollable .modal-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.hero-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #061127 0%, #0a2250 50%, #0b5ed7 100%);
  color: var(--text-light);
  border-radius: 1rem;
  padding: 2rem;
}

.glass-card {
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(2, 8, 20, 0.08);
}

body.theme-dark .glass-card {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow: 0 12px 32px rgba(2, 8, 20, 0.45);
}

body.theme-dark .navbar.bg-white {
  background-color: #0b1220 !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
}

body.theme-dark .navbar .navbar-brand,
body.theme-dark .navbar .nav-link,
body.theme-dark .navbar .navbar-toggler {
  color: #e5e7eb !important;
}

body.theme-dark .navbar .nav-link:hover,
body.theme-dark .navbar .nav-link:focus {
  color: #ffffff !important;
}

body.theme-dark .navbar .navbar-toggler-icon {
  filter: invert(1) brightness(1.6);
}

body.theme-dark .mobile-bottom-nav {
  background: rgba(11, 18, 32, 0.95);
  border-color: rgba(148, 163, 184, 0.3);
}

body.theme-dark .mobile-bottom-nav__item {
  color: #cbd5e1;
}

body.theme-dark .mobile-bottom-nav__item--active:not(.mobile-bottom-nav__item--add) {
  background: rgba(11, 94, 215, 0.28);
  color: #dbeafe;
}

body.theme-dark footer.bg-white {
  background-color: #0b1220 !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
}

body.theme-dark .form-control,
body.theme-dark .form-select,
body.theme-dark .form-control:focus,
body.theme-dark .form-select:focus {
  background-color: #0b1220;
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.4);
}

body.theme-dark .form-control[type="file"]::file-selector-button {
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #1e293b;
  color: #e5e7eb;
}

body.theme-dark input::placeholder,
body.theme-dark textarea::placeholder {
  color: #94a3b8 !important;
  opacity: 1;
}

body.theme-dark .text-muted,
body.theme-dark .form-text {
  color: #94a3b8 !important;
}

body.theme-dark .text-dark {
  color: #e5e7eb !important;
}

body.theme-dark .list-group-item {
  background: transparent;
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.22);
}

body.theme-dark .accordion-item,
body.theme-dark .accordion-button,
body.theme-dark .accordion-body {
  background: transparent;
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.22);
}

body.theme-dark .accordion-button::after {
  filter: invert(1) brightness(1.55);
}

body.theme-dark .badge.text-bg-light {
  background-color: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: rgba(148, 163, 184, 0.35) !important;
}

body.theme-dark .dropdown-menu {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.25);
}

body.theme-dark .dropdown-item {
  color: #e5e7eb;
}

body.theme-dark .dropdown-item:hover,
body.theme-dark .dropdown-item:focus {
  background: #1e293b;
  color: #f8fafc;
}

body.theme-dark .join-code-display,
body.theme-dark .month-day,
body.theme-dark .calendar-list-day,
body.theme-dark .calendar-list-empty-all {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(148, 163, 184, 0.28);
  color: #e5e7eb;
}

body.theme-dark .month-day--outside {
  background: rgba(15, 23, 42, 0.55);
}

body.theme-dark .month-weekday,
body.theme-dark .month-day-number,
body.theme-dark .calendar-list-day-title {
  color: #cbd5e1;
}

body.theme-dark .month-day-number:hover {
  background: rgba(11, 94, 215, 0.25);
}

body.theme-dark .month-event-btn {
  background: rgba(11, 94, 215, 0.28);
  color: #e2e8f0;
}

body.theme-dark .month-day--today {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.28);
}

body.theme-dark .month-day--today .month-day-number {
  color: #bfdbfe;
  background: rgba(96, 165, 250, 0.2);
}

body.theme-dark .calendar-list-day--today {
  border-color: #60a5fa;
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.28);
}

body.theme-dark .calendar-today-badge {
  background: rgba(96, 165, 250, 0.28);
  color: #dbeafe;
}

body.theme-dark .month-event-more,
body.theme-dark .calendar-list-empty,
body.theme-dark .calendar-list-empty-all {
  color: #94a3b8;
}

body.theme-dark .modal-content {
  background: #0f172a;
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.28);
}

body.theme-dark .modal-header,
body.theme-dark .modal-footer {
  border-color: rgba(148, 163, 184, 0.25);
}

body.theme-dark .modal .btn-close {
  filter: invert(1) grayscale(100%) brightness(170%);
}

body.theme-dark .modal .bg-light-subtle {
  background: rgba(30, 41, 59, 0.7) !important;
  border-color: rgba(148, 163, 184, 0.28) !important;
}

body.theme-dark .modal .input-group-text {
  background: #1e293b;
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.35);
}

body.theme-dark .calendar-search-results {
  background: rgba(15, 23, 42, 0.92);
  border-color: rgba(148, 163, 184, 0.28);
}

body.theme-dark .calendar-search-card .form-control {
  background-color: #0b1220;
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.35);
}

.btn-google-auth {
  background: #ffffff;
  color: #111827;
  border: 1px solid rgba(15, 23, 42, 0.18);
}

.btn-google-auth:hover,
.btn-google-auth:focus {
  background: #ffffff;
  color: #111827;
  border-color: rgba(15, 23, 42, 0.35);
}

.landing-hero {
  border-radius: 1rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(11, 94, 215, 0.12), rgba(14, 165, 233, 0.12), rgba(16, 185, 129, 0.1));
  border: 1px solid rgba(11, 94, 215, 0.14);
}

.landing-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: #e8f1ff;
  color: #0b5ed7;
}

.landing-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.landing-stat {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.75rem;
  padding: 0.7rem 0.8rem;
}

.landing-stat strong {
  display: block;
  font-size: 0.92rem;
}

.landing-stat span {
  display: block;
  font-size: 0.8rem;
  color: #4b5563;
}

.landing-preview-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 12px 26px rgba(2, 8, 20, 0.08);
}

.landing-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.landing-preview-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.landing-preview-list li {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.landing-preview-list i {
  color: #0b5ed7;
}

.feature-card h2 {
  margin-bottom: 0.45rem;
}

.workflow-grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.workflow-step {
  border: 1px dashed rgba(11, 94, 215, 0.35);
  border-radius: 0.85rem;
  padding: 0.75rem;
  background: rgba(11, 94, 215, 0.04);
}

.workflow-step span {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: #0b5ed7;
  color: #fff;
  margin-bottom: 0.4rem;
}

.workflow-step p {
  margin: 0;
  font-size: 0.92rem;
}

.plan-card {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 0.85rem;
  padding: 1rem;
  background: #f8fbff;
}

body.theme-dark .landing-hero {
  background: linear-gradient(135deg, rgba(11, 94, 215, 0.24), rgba(14, 165, 233, 0.16), rgba(16, 185, 129, 0.12));
  border-color: rgba(148, 163, 184, 0.3);
}

body.theme-dark .landing-pill {
  background: rgba(11, 94, 215, 0.22);
  color: #dbeafe;
}

body.theme-dark .landing-stat,
body.theme-dark .landing-preview-card,
body.theme-dark .plan-card {
  background: rgba(15, 23, 42, 0.88);
  border-color: rgba(148, 163, 184, 0.28);
  color: #e5e7eb;
}

body.theme-dark .landing-stat span {
  color: #94a3b8;
}

body.theme-dark .workflow-step {
  background: rgba(11, 94, 215, 0.12);
  border-color: rgba(96, 165, 250, 0.5);
}

@media (prefers-color-scheme: dark) {
  body.theme-system .landing-hero {
    background: linear-gradient(135deg, rgba(11, 94, 215, 0.24), rgba(14, 165, 233, 0.16), rgba(16, 185, 129, 0.12));
    border-color: rgba(148, 163, 184, 0.3);
  }

  body.theme-system .landing-pill {
    background: rgba(11, 94, 215, 0.22);
    color: #dbeafe;
  }

  body.theme-system .landing-stat,
  body.theme-system .landing-preview-card,
  body.theme-system .plan-card {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(148, 163, 184, 0.28);
    color: #e5e7eb;
  }

  body.theme-system .landing-stat span {
    color: #94a3b8;
  }

  body.theme-system .workflow-step {
    background: rgba(11, 94, 215, 0.12);
    border-color: rgba(96, 165, 250, 0.5);
  }
}

@media (max-width: 991.98px) {
  .landing-stat-row {
    grid-template-columns: 1fr;
  }

  .workflow-grid {
    grid-template-columns: 1fr;
  }
}

.admin-shell {
  min-height: 100vh;
  background: var(--bg-soft);
}

.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 248px;
  height: 100vh;
  background: #0f172a;
  color: #e2e8f0;
  border-right: 1px solid rgba(148, 163, 184, 0.22);
  display: flex;
  flex-direction: column;
  z-index: 1030;
}

.admin-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1rem 0.85rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.admin-brand-logo {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 0.3rem;
  flex: 0 0 auto;
}

.admin-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.8rem;
}

.admin-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.55rem;
  color: #cbd5e1;
  text-decoration: none;
}

.admin-sidebar__link:hover {
  background: rgba(30, 41, 59, 0.88);
  color: #f8fafc;
}

.admin-sidebar__link.is-active {
  background: rgba(11, 94, 215, 0.3);
  color: #dbeafe;
}

.admin-sidebar__link[aria-disabled="true"] {
  opacity: 0.6;
  pointer-events: none;
}

.admin-sidebar__foot {
  margin-top: auto;
  padding: 0.9rem;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.admin-main {
  margin-left: 248px;
  min-height: 100vh;
  padding: 1.25rem;
}

.admin-contact-list {
  max-height: calc(100vh - 230px);
  overflow-y: auto;
}

.admin-chart-wrap {
  position: relative;
  width: 100%;
  height: 260px;
}

.admin-users-table th,
.admin-users-table td {
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.admin-login-body {
  min-height: 100vh;
  background: radial-gradient(circle at 12% 0%, #e5efff 0%, #f7f9fc 40%, #ffffff 75%);
}

@media (max-width: 991.98px) {
  .admin-sidebar {
    position: static;
    width: 100%;
    height: auto;
  }

  .admin-sidebar__nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .admin-main {
    margin-left: 0;
  }
}

body.theme-dark .calendar-search-card .input-group-text {
  background-color: #1e293b;
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.35);
}

body.theme-dark .calendar-jump-group .input-group-text {
  background-color: #1e293b;
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.35);
}

body.theme-dark .calendar-jump-group .form-control {
  background-color: #0b1220;
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.35);
}

body.theme-dark .calendar-search-card .btn-outline-secondary {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.45);
}

body.theme-dark .calendar-search-card .btn-outline-secondary:hover {
  background: rgba(30, 41, 59, 0.9);
  color: #f8fafc;
}

body.theme-dark .calendar-search-row {
  border-bottom-color: rgba(148, 163, 184, 0.2);
}

body.theme-dark .calendar-search-row:hover {
  background: rgba(30, 41, 59, 0.9);
}

body.theme-dark .calendar-search-title {
  color: #e2e8f0;
}

body.theme-dark .calendar-search-meta,
body.theme-dark .calendar-search-empty {
  color: #94a3b8;
}

@media (prefers-color-scheme: dark) {
  body.theme-system .glass-card {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.25);
    box-shadow: 0 12px 32px rgba(2, 8, 20, 0.45);
  }

  body.theme-system .navbar.bg-white {
    background-color: #0b1220 !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
  }

  body.theme-system .navbar .navbar-brand,
  body.theme-system .navbar .nav-link,
  body.theme-system .navbar .navbar-toggler {
    color: #e5e7eb !important;
  }

  body.theme-system .navbar .nav-link:hover,
  body.theme-system .navbar .nav-link:focus {
    color: #ffffff !important;
  }

  body.theme-system .navbar .navbar-toggler-icon {
    filter: invert(1) brightness(1.6);
  }

  body.theme-system .mobile-bottom-nav {
    background: rgba(11, 18, 32, 0.95);
    border-color: rgba(148, 163, 184, 0.3);
  }

  body.theme-system .mobile-bottom-nav__item {
    color: #cbd5e1;
  }

  body.theme-system .mobile-bottom-nav__item--active:not(.mobile-bottom-nav__item--add) {
    background: rgba(11, 94, 215, 0.28);
    color: #dbeafe;
  }

  body.theme-system footer.bg-white {
    background-color: #0b1220 !important;
    border-color: rgba(148, 163, 184, 0.25) !important;
  }

  body.theme-system .form-control,
  body.theme-system .form-select,
  body.theme-system .form-control:focus,
  body.theme-system .form-select:focus {
    background-color: #0b1220;
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.4);
  }

  body.theme-system .form-control[type="file"]::file-selector-button {
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: #1e293b;
    color: #e5e7eb;
  }

  body.theme-system input::placeholder,
  body.theme-system textarea::placeholder {
    color: #94a3b8 !important;
    opacity: 1;
  }

  body.theme-system .text-muted,
  body.theme-system .form-text {
    color: #94a3b8 !important;
  }

  body.theme-system .text-dark {
    color: #e5e7eb !important;
  }

  body.theme-system .list-group-item {
    background: transparent;
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.22);
  }

  body.theme-system .accordion-item,
  body.theme-system .accordion-button,
  body.theme-system .accordion-body {
    background: transparent;
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.22);
  }

  body.theme-system .accordion-button::after {
    filter: invert(1) brightness(1.55);
  }

  body.theme-system .badge.text-bg-light {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: rgba(148, 163, 184, 0.35) !important;
  }

  body.theme-system .dropdown-menu {
    background: #0f172a;
    border-color: rgba(148, 163, 184, 0.25);
  }

  body.theme-system .dropdown-item {
    color: #e5e7eb;
  }

  body.theme-system .dropdown-item:hover,
  body.theme-system .dropdown-item:focus {
    background: #1e293b;
    color: #f8fafc;
  }

  body.theme-system .join-code-display,
  body.theme-system .month-day,
  body.theme-system .calendar-list-day,
  body.theme-system .calendar-list-empty-all {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(148, 163, 184, 0.28);
    color: #e5e7eb;
  }

  body.theme-system .month-day--outside {
    background: rgba(15, 23, 42, 0.55);
  }

  body.theme-system .month-weekday,
  body.theme-system .month-day-number,
  body.theme-system .calendar-list-day-title {
    color: #cbd5e1;
  }

  body.theme-system .month-day-number:hover {
    background: rgba(11, 94, 215, 0.25);
  }

  body.theme-system .month-event-btn {
    background: rgba(11, 94, 215, 0.28);
    color: #e2e8f0;
  }

  body.theme-system .month-day--today {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.28);
  }

  body.theme-system .month-day--today .month-day-number {
    color: #bfdbfe;
    background: rgba(96, 165, 250, 0.2);
  }

  body.theme-system .calendar-list-day--today {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.28);
  }

  body.theme-system .calendar-today-badge {
    background: rgba(96, 165, 250, 0.28);
    color: #dbeafe;
  }

  body.theme-system .month-event-more,
  body.theme-system .calendar-list-empty,
  body.theme-system .calendar-list-empty-all {
    color: #94a3b8;
  }

  body.theme-system .modal-content {
    background: #0f172a;
    color: #e5e7eb;
    border: 1px solid rgba(148, 163, 184, 0.28);
  }

  body.theme-system .modal-header,
  body.theme-system .modal-footer {
    border-color: rgba(148, 163, 184, 0.25);
  }

  body.theme-system .modal .btn-close {
    filter: invert(1) grayscale(100%) brightness(170%);
  }

  body.theme-system .modal .bg-light-subtle {
    background: rgba(30, 41, 59, 0.7) !important;
    border-color: rgba(148, 163, 184, 0.28) !important;
  }

  body.theme-system .modal .input-group-text {
    background: #1e293b;
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.35);
  }

  body.theme-system .calendar-search-results {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.28);
  }

  body.theme-system .calendar-search-card .form-control {
    background-color: #0b1220;
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.35);
  }

  body.theme-system .calendar-search-card .input-group-text {
    background-color: #1e293b;
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.35);
  }

  body.theme-system .calendar-jump-group .input-group-text {
    background-color: #1e293b;
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.35);
  }

  body.theme-system .calendar-jump-group .form-control {
    background-color: #0b1220;
    color: #e5e7eb;
    border-color: rgba(148, 163, 184, 0.35);
  }

  body.theme-system .calendar-search-card .btn-outline-secondary {
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.45);
  }

  body.theme-system .calendar-search-card .btn-outline-secondary:hover {
    background: rgba(30, 41, 59, 0.9);
    color: #f8fafc;
  }

  body.theme-system .calendar-search-row {
    border-bottom-color: rgba(148, 163, 184, 0.2);
  }

  body.theme-system .calendar-search-row:hover {
    background: rgba(30, 41, 59, 0.9);
  }

  body.theme-system .calendar-search-title {
    color: #e2e8f0;
  }

  body.theme-system .calendar-search-meta,
  body.theme-system .calendar-search-empty {
    color: #94a3b8;
  }
}

.section-title {
  text-align: center;
  margin-bottom: 1rem;
}

.avatar-placeholder {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e9f2ff;
  color: #0b5ed7;
}

.avatar-image {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid #cbd5e1;
}

.member-avatar-image {
  width: 44px;
  height: 44px;
}

.profile-avatar-preview {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid #dbe4f3;
  background: #f8fafc;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.profile-actions > form {
  margin: 0;
}

.notification-card-clickable {
  cursor: pointer;
}

.profile-version {
  color: #475569;
}

body.theme-dark .profile-version {
  color: #94a3b8;
}

@media (prefers-color-scheme: dark) {
  body.theme-system .profile-version {
    color: #94a3b8;
  }
}

.join-code-share {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.join-code-display {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0.45rem 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid #dbe4f3;
  background: #f8fbff;
  letter-spacing: 0.05em;
}

.avatar-crop-container {
  width: 100%;
  max-height: 60vh;
  overflow: hidden;
  background: #111827;
  border-radius: 0.75rem;
}

.avatar-crop-image {
  display: block;
  max-width: 100%;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -10px;
  font-size: 0.65rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

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

.fade-in {
  opacity: 0;
  transform: translateY(10px);
  animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-slot {
  min-height: 58px;
}

.mobile-bottom-nav {
  display: none;
}

.mobile-bottom-nav__badge {
  position: absolute;
  top: -0.4rem;
  right: -0.55rem;
  min-width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  font-size: 0.62rem;
  line-height: 1rem;
  text-align: center;
  padding: 0 0.22rem;
}

.mobile-bottom-nav__icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 991.98px) {
  .calendar-invite-submit {
    width: 100%;
  }

  .calendar-leave-submit {
    width: 100%;
  }

  .join-code-share {
    flex-direction: column;
    align-items: stretch;
  }

  .join-code-display {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .join-code-share .btn {
    width: 100%;
  }

  .profile-save-btn {
    width: 100%;
  }

  .settings-save-btn {
    width: 100%;
  }

  .settings-install-btn {
    width: 100%;
  }

  .profile-photo-title {
    display: block;
    text-align: center;
  }

  .profile-photo-wrap {
    justify-content: center;
  }

  .profile-photo-controls {
    align-items: center;
    text-align: center;
  }

  .profile-photo-controls .form-control {
    width: min(100%, 22rem);
  }

  .profile-photo-controls .d-flex {
    justify-content: center;
  }

  .profile-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-actions > .btn,
  .profile-actions > form,
  .profile-actions > form .btn {
    width: 100%;
  }

  .has-mobile-nav > .navbar {
    display: none !important;
  }

  .has-mobile-nav .app-main {
    padding-top: 0 !important;
    padding-bottom: 6.2rem !important;
  }

  .has-mobile-nav footer {
    display: none !important;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0.6rem;
    right: 0.6rem;
    bottom: calc(0.5rem + env(safe-area-inset-bottom));
    z-index: 1040;
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.38rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(6px);
  }

  .mobile-bottom-nav--guest {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mobile-bottom-nav__item {
    color: #334155;
    text-decoration: none;
    border-radius: 0.8rem;
    font-size: 0.68rem;
    font-weight: 700;
    min-height: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
  }

  .mobile-bottom-nav__item i {
    font-size: 1.08rem;
    line-height: 1;
  }

  .mobile-bottom-nav__item--add {
    background: #0b5ed7;
    color: #fff;
  }

  .mobile-bottom-nav__item--active:not(.mobile-bottom-nav__item--add) {
    background: #e8f1ff;
    color: #0b5ed7;
  }
}

.month-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.calendar-nav-head #monthLabel {
  line-height: 1.3;
  word-break: break-word;
}

.calendar-jump-group {
  width: 100%;
}

.calendar-jump-group .input-group-text {
  background: #eef2ff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, 0.15);
}

.calendar-jump-group .form-control {
  min-width: 11rem;
}

@media (min-width: 768px) {
  .calendar-jump-group {
    width: auto;
    max-width: 360px;
  }
}

.calendar-search-wrap {
  position: relative;
}

.calendar-search-card .input-group-text {
  min-width: 2.2rem;
  justify-content: center;
}

.calendar-search-results {
  margin-top: 0.4rem;
  border: 1px solid #dbe4f3;
  border-radius: 0.75rem;
  background: #fff;
  overflow: hidden;
}

.calendar-search-row {
  width: 100%;
  display: block;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  background: transparent;
  padding: 0.55rem 0.7rem;
}

.calendar-search-row:last-child {
  border-bottom: 0;
}

.calendar-search-row:hover {
  background: #f8fbff;
}

.calendar-search-title {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.9rem;
}

.calendar-search-meta {
  font-size: 0.78rem;
  color: #64748b;
}

.calendar-search-empty {
  padding: 0.55rem 0.7rem;
  font-size: 0.82rem;
  color: #64748b;
}

.month-scroll {
  overflow-x: auto;
}

.month-weekday {
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  font-weight: 700;
  color: #475569;
  padding: 0.3rem;
  text-transform: uppercase;
}

.month-days {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.35rem;
}

.month-days--list {
  display: block;
}

.month-day {
  min-height: 124px;
  border: 1px solid #dbe4f3;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.month-day--outside {
  background: #f8fafc;
  opacity: 0.75;
}

.month-day--today {
  border-color: #0b5ed7;
  box-shadow: 0 0 0 2px rgba(11, 94, 215, 0.15);
}

.month-day--today .month-day-number {
  color: #0b5ed7;
  background: rgba(11, 94, 215, 0.12);
}

.month-day-number {
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
  border-radius: 0.4rem;
  padding: 0.15rem 0.25rem;
}

.month-day-number:hover {
  background: #e8f1ff;
}

.month-day-events {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow: hidden;
}

.month-event-btn {
  width: 100%;
  border: 1px solid transparent;
  background: #e8f1ff;
  color: #0f172a;
  text-align: left;
  border-radius: 0.4rem;
  padding: 0.2rem 0.35rem;
  font-size: 0.72rem;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.month-event-btn:hover {
  filter: brightness(0.94);
}

.month-event-recurring {
  color: currentColor;
  opacity: 0.9;
  font-weight: 700;
}

.month-event-more {
  font-size: 0.72rem;
  color: #64748b;
  padding: 0 0.2rem;
}

.calendar-list-day {
  border: 1px solid #dbe4f3;
  border-radius: 0.75rem;
  background: #fff;
  padding: 0.65rem;
  margin-bottom: 0.55rem;
}

.calendar-list-day:last-child {
  margin-bottom: 0;
}

.calendar-list-day--today {
  border-color: #0b5ed7;
  box-shadow: 0 0 0 2px rgba(11, 94, 215, 0.15);
}

.calendar-list-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.calendar-list-day-title {
  font-weight: 700;
  color: #0f172a;
}

.calendar-today-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.4rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  background: rgba(11, 94, 215, 0.15);
  color: #0b5ed7;
  vertical-align: middle;
}

.calendar-list-events {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.calendar-list-event-btn {
  white-space: normal;
  overflow: visible;
  text-overflow: initial;
}

.calendar-list-empty,
.calendar-list-empty-all {
  font-size: 0.85rem;
  color: #64748b;
}

.calendar-list-empty-all {
  border: 1px dashed #cbd5e1;
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  background: #fff;
}

@media (max-width: 991.98px) {
  .month-scroll {
    overflow-x: visible;
  }

  .month-weekdays,
  .month-days {
    width: 100%;
    gap: 0.25rem;
  }

  .month-day {
    min-height: 96px;
    padding: 0.25rem;
  }

  .calendar-list-day {
    padding: 0.55rem;
  }
}

@media (max-width: 575.98px) {
  .month-weekday {
    font-size: 0.62rem;
    padding: 0.2rem 0;
  }

  .month-day {
    min-height: 78px;
    border-radius: 0.55rem;
    padding: 0.2rem;
    gap: 0.15rem;
  }

  .month-day-number {
    font-size: 0.72rem;
    padding: 0.05rem 0.15rem;
  }

  .month-event-btn {
    font-size: 0.58rem;
    padding: 0.1rem 0.2rem;
    border-radius: 0.3rem;
  }

  .month-event-more {
    font-size: 0.58rem;
    padding: 0;
  }

  .calendar-list-day-title {
    font-size: 0.84rem;
  }

  .calendar-list-day-head .btn {
    font-size: 0.68rem;
    padding: 0.18rem 0.4rem;
  }
}
