:root {
  --ios-bg: #f7f4ff;
  --card: rgba(255, 255, 255, 0.78);
  --text: #13131a;
  --muted: #6f6f84;
  --border: #dfdded;
  --blue: #5f5bff;
  --blue-soft: #ecebff;
  --red-soft: #ffdce2;
  --orange-soft: #ffe3c2;
  --green-soft: #d8f5df;
}

* {
  box-sizing: border-box;
  font-family: 'Inter', system-ui, sans-serif;
}

body {
  margin: 0;
  color: var(--text);
  min-height: 100vh;
  padding-top: 132px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 10% 12%, #ffffff 0%, #f2ebff 28%, #e6f0ff 54%, #ffe7d0 100%),
    radial-gradient(circle at 90% 5%, #f7f9ff 0%, #efe5ff 42%, #f8e7d5 100%);
}

.glass {
  backdrop-filter: saturate(170%) blur(10px);
  -webkit-backdrop-filter: saturate(170%) blur(10px);
}

h1,
h2,
h3,
p {
  margin: 0;
}

.sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.topbar {
  padding: 16px 20px;
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid #ffffff8a;
  background: linear-gradient(120deg, #19182a 0%, #252341 55%, #2b2a4c 100%);
  color: #f3f4ff;
}

.topbar .btn-soft,
.topbar .btn-primary,
.topbar .btn-ghost {
  border-color: #4a4a78;
  color: #ececff;
  background: rgba(255, 255, 255, 0.08);
}

.topbar .btn-primary {
  background: linear-gradient(120deg, #6c67ff 0%, #5b7bff 100%);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hub-folders {
  display: flex;
  gap: 10px;
  align-items: center;
}

.folder-logo-btn {
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 4px;
  background: transparent;
  cursor: pointer;
  opacity: 0.82;
}

.folder-logo-btn.active {
  opacity: 1;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.4);
}

.brand-logo {
  width: 180px;
  object-fit: contain;
}

.folder-logo {
  display: block;
  width: 150px;
  max-height: 60px;
}

.menu-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.todo-back-wrap {
  margin-top: 10px;
}

.menu-separator {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.35);
}

.btn-slack {
  background: linear-gradient(120deg, #4a154b 0%, #7b2f81 100%);
  color: #fff;
  border-color: #9350a2;
}

.container {
  max-width: 1320px;
  width: 100%;
  margin: 18px auto;
  padding: 0 16px 20px;
  display: grid;
  gap: 14px;
  flex: 1 0 auto;
}

#meetingFormSection {
  scroll-margin-top: 160px;
}

.card {
  background: var(--card);
  border: 1px solid #dbe3f0;
  border-radius: 24px;
  padding: 16px;
}

.card.collapsed .grid-form,
.card.collapsed .header-actions {
  display: none;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  gap: 10px;
}

.card-header.wrap {
  flex-wrap: wrap;
}

.card-header i {
  margin-right: 6px;
}

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

.grid-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(210px, 1fr));
  gap: 12px;
}

.full-col {
  grid-column: 1 / -1;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

input,
textarea {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px 12px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  outline: none;
}

select {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 11px 12px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--blue);
}

textarea {
  resize: vertical;
}

.btn {
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.12s ease, background-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sharepoint-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.btn:active {
  transform: scale(0.98);
}

.btn-pill {
  border-radius: 999px;
  padding: 10px 18px;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-soft {
  background: var(--blue-soft);
  color: #4a3eff;
}

.btn-ghost {
  border-color: var(--border);
  background: #fff;
  color: var(--text);
}

.multi-picker {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  min-height: 52px;
  background: #fff;
  position: relative;
  overflow: visible;
}

.picker-shell {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}

.picker-shell.is-open {
  z-index: 25;
}

.picker-selected-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.picker-input {
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
}

.picker-suggestions {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: auto;
  max-height: 180px;
  background: #fff;
  display: flex;
  flex-direction: column;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
}

.picker-suggestion {
  border: none;
  background: #fff;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid #f0f0f3;
  font-size: 13px;
  cursor: pointer;
}

.picker-suggestion:hover {
  background: #f6f8ff;
}

.picker-add {
  color: var(--blue);
  font-weight: 700;
  border-bottom: none;
}

.picker-empty {
  padding: 9px 10px;
  font-size: 12px;
  color: var(--muted);
}

.option-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  background: #f8f8fb;
}

.picker-pill {
  padding-right: 6px;
}

.pill-remove {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  margin-left: auto;
}

.option-chip .chip-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.avatar,
.provider-img {
  height: 20px;
  object-fit: cover;
}

.provider-img {
  width: auto;
  border-radius: 0;
}

.provider-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

.avatar {
  width: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.filter {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.playlist-inline-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.filter select {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  background: #fff;
}

.quick-filters-wrap {
  position: relative;
  width: 100%;
  overflow: visible;
  padding-bottom: 4px;
}

.quick-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  margin-bottom: 6px;
}

.quick-filter {
  flex: 0 1 auto;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.quick-count {
  background: #ebe9ff;
  color: #4138d8;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
}

.in-progress-live {
  margin-left: 2px;
  background: #ff4665;
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
}

.quick-filter.active {
  background: var(--blue-soft);
  color: #3e36dd;
  border-color: #cfcaff;
}

.meetings-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-height: 460px;
}

.meetings-error-state {
  grid-column: 1 / -1;
  min-height: 280px;
  border: 1px solid #ffd3dd;
  background: linear-gradient(180deg, #fff7fa 0%, #ffeef3 100%);
  border-radius: 18px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  padding: 22px;
  animation: errorCardIn 0.35s ease;
}

.meetings-error-icon {
  font-size: 36px;
  color: #d43b65;
  animation: errorPulse 1.4s ease-in-out infinite;
}

@keyframes errorPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.8;
  }
}

@keyframes errorCardIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.meeting-item {
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 10px;
  border: 1px solid #ffffff99;
  transition: transform 0.2s ease, filter 0.2s ease;
  cursor: pointer;
}

.meeting-item:hover {
  transform: translateY(-2px);
  filter: saturate(1.03);
}

.meeting-item.status-today {
  background: linear-gradient(180deg, #ffd9df 0%, #ffc8d2 100%);
}

.meeting-item.status-finished {
  background: linear-gradient(180deg, #d9f4df 0%, #c8edcf 100%);
}

.meeting-item.status-in-progress {
  background: linear-gradient(180deg, #ffe6c8 0%, #ffd7aa 100%);
}

.meeting-item.status-upcoming {
  background: linear-gradient(180deg, #e9e4ff 0%, #ddd3ff 100%);
  border: 1px solid #7f73ff;
}

.meeting-item.is-nearest {
  background: linear-gradient(135deg, #d8e7ff 0%, #f0e2ff 45%, #ffe0c7 100%);
  border: 2px solid #7a6bff;
  box-shadow: 0 0 0 0 rgba(122, 107, 255, 0.4);
  animation: nearestBreath 2.6s ease-in-out infinite;
}

.meeting-item.disabled {
  opacity: 0.92;
}

.meeting-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.top-badges {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  color: #fff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.badge.in-progress {
  background: #ef8f00;
}

.badge.finished {
  background: #3e9f57;
}

.badge.today {
  background: #de3c5f;
}

.badge.upcoming {
  background: #5348e4;
}

.badge.nearest {
  background: #3b356f;
}

.badge.playlist {
  background: #175383;
}

.badge.overdue {
  background: #a62a2a;
}

.meeting-duration,
.meeting-note,
.countdown {
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.countdown {
  background: #ffffff8a;
  border: 1px solid #ffffffc2;
  border-radius: 10px;
  width: fit-content;
  padding: 4px 8px;
  font-weight: 600;
}

.countdown.alert-upcoming {
  background: linear-gradient(90deg, #ffdfc3 0%, #ffd3ae 100%);
  border-color: #ff9f43;
  color: #6a2b00;
  font-weight: 800;
}

.countdown.nearest-countdown {
  background: linear-gradient(90deg, #ffd8df 0%, #ffbcc8 100%);
  border-color: #f44f72;
  color: #7a1027;
  animation: upcomingAlertPulse 1.5s ease-in-out infinite;
}

.countdown.in-progress {
  background: linear-gradient(90deg, #ffe2bf 0%, #ffd3a0 100%);
  border-color: #ff9f43;
  color: #7f3d00;
  font-weight: 800;
  white-space: nowrap;
}

.providers-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.provider-thumb {
  width: 100px;
  object-fit: contain;
  background-color: #ffffff70;
  border-radius: 15px;
}

.participants-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.participant-pill {
  display: flex;
  gap: 7px;
  align-items: center;
}

.participant-pill::after {
  content: ';';
  color: #514b6c;
}

.participant-pill:last-child::after {
  content: '';
}

.participant-initials {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #5450c8;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.participant-empty {
  color: #5f5f73;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.meeting-link {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: #21213a;
  font-weight: 600;
  text-decoration: none;
}

.link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.btn-subtle {
  padding: 6px 10px;
  font-size: 12px;
  background: #ffffff99;
}

.meeting-link.muted {
  color: #5f5f73;
  font-weight: 500;
}

.provider-inline-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

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

.btn-action,
.btn-soft-radius {
  border-radius: 12px;
}

.btn-action {
  padding: 8px 12px;
}

.post-meeting-box {
  border: 1px solid #cdc4f6;
  border-radius: 18px;
  padding: 12px;
  display: grid;
  gap: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #f3efff 100%);
}

.post-meeting-title {
  font-size: 13px;
  font-weight: 700;
  color: #4b4478;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.post-meeting-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.post-fields {
  display: grid;
  gap: 10px;
}

.recording-preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  background: #ffffffc4;
  border: 1px solid #dad3fb;
  border-radius: 12px;
  padding: 8px 10px;
}

.recording-label {
  font-size: 12px;
  color: #3f3a67;
  font-weight: 700;
}

.recording-empty {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: #6a648e;
  font-size: 12px;
}

.rec-pill {
  background: #311226;
  color: #fff;
  border-color: #5a1d42;
  padding: 5px 10px;
  animation: recPulse 1.1s ease-in-out infinite;
}

.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff354f;
  box-shadow: 0 0 0 0 rgba(255, 53, 79, 0.55);
  animation: recDotPulse 1.1s ease-in-out infinite;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.modal {
  border: none;
  border-radius: 20px;
  padding: 0;
  width: min(440px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  position: relative;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.25);
}

.modal,
.modal * {
  box-sizing: border-box;
}

.modal-content {
  margin: 0;
  padding: 16px;
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 100%;
}

#todoModal {
  width: min(1120px, calc(100vw - 24px));
  overflow: visible;
}

#todoModal .modal-content {
  max-height: 86vh;
  overflow-y: auto;
}

#todoModal .swal2-container {
  position: absolute !important;
  inset: 0;
  z-index: 100020 !important;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  position: static;
  z-index: auto;
}

.modal input,
.modal select,
.modal textarea,
.modal button {
  max-width: 100%;
}

.modal input,
.modal select,
.modal textarea {
  width: 100%;
  min-width: 0;
}

.modal input[type='file'] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.notice {
  border-radius: 14px;
  padding: 12px;
  border: 1px solid #ffd0cc;
  background: #fff1f0;
  color: #b3261e;
  font-size: 14px;
}

.spinner-wrap {
  display: grid;
  place-items: center;
  padding: 26px;
}

.spinner {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid #d9d4ff;
  border-top-color: var(--blue);
  animation: spin 0.9s linear infinite;
}

.spinner.mini {
  width: 17px;
  height: 17px;
  border-width: 2px;
}

.hidden {
  display: none !important;
}

.todo-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 360px;
}

.todo-item {
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: visible;
  background: #fff;
  width: 100%;
  position: relative;
}

.todo-item.is-overdue {
  border-color: #f1a4a4;
  box-shadow: 0 0 0 1px #ffd4d4;
}

.todo-cover {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  border-radius: 18px 18px 0 0;
}

.todo-main {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.todo-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.todo-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.todo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.todo-progress {
  height: 10px;
  width: 100%;
  border-radius: 999px;
  background: #ecebfd;
  overflow: hidden;
}

.todo-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6258ff 0%, #47a2ff 100%);
  transition: width 0.25s ease;
}

.todo-checks {
  display: grid;
  gap: 6px;
}

.todo-check {
  display: flex;
  flex-direction: row;
  gap: 8px;
  align-items: center;
  color: var(--text);
}

.todo-task-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  display: grid;
  gap: 6px;
  position: relative;
  overflow: visible;
}

.todo-task-row.is-editing {
  border-color: #7e8cff;
  background: #f7f8ff;
  box-shadow: 0 0 0 2px #dfe3ff;
  z-index: 20;
}

.todo-task-row.is-overdue {
  background: #f1f1f4;
  color: #7a7a87;
  border-color: #d2d2dc;
}

.todo-task-row.is-editing.is-overdue {
  background: #f7f8ff;
  color: var(--text);
  border-color: #7e8cff;
}

.todo-task-dates {
  font-size: 12px;
  color: var(--muted);
}

.todo-task-comment-wrap {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.todo-task-comment-wrap .bi {
  color: #2f8f4e;
  margin-top: 8px;
}

.todo-task-comment {
  width: 100%;
  min-height: 72px;
  max-height: 108px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #caead4;
  background: #f2fbf5;
  font-size: 12px;
  line-height: 1.45;
  color: #2f8f4e;
  font-style: normal;
  overflow-y: auto;
  white-space: pre-wrap;
  cursor: default;
  user-select: text;
}

.todo-task-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.todo-task-editing-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.todo-editing-badge,
.todo-task-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
}

.todo-editing-badge {
  background: #e5e9ff;
  color: #3551d8;
}

.todo-task-state {
  background: #eef1f4;
  color: #5a6170;
}

.todo-task-editor-grid {
  display: grid;
  gap: 10px;
}

.todo-task-editor-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.todo-task-editor-dates .flatpickr-wrapper {
  position: relative;
  z-index: 40;
}

.todo-task-editor-dates .flatpickr-calendar {
  z-index: 100020 !important;
}

.todo-inline-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #4d5465;
}

.todo-task-inline-input,
.todo-task-inline-textarea {
  width: 100%;
  border: 1px solid #ccd5e4;
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  font: inherit;
  padding: 10px 12px;
}

.todo-task-inline-input:focus,
.todo-task-inline-textarea:focus {
  outline: none;
  border-color: #6a7aff;
  box-shadow: 0 0 0 3px rgba(95, 91, 255, 0.14);
}

.todo-task-inline-textarea {
  min-height: 110px;
  resize: vertical;
  overflow-y: auto;
}

.todo-task-action-buttons {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-danger-soft {
  border-color: #f4bcc4;
  background: #fff1f3;
  color: #cb2747;
}

.btn-danger-soft:hover {
  border-color: #eb8d9d;
  background: #ffe4e8;
}

.todo-task-flags {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.todo-overdue-label {
  font-size: 12px;
  font-weight: 700;
  color: #8d1f1f;
}

.todo-comment-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #ffb8c4;
  background: #ffe8ed;
  color: #a6233c;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  line-height: 1.2;
  animation: commentPillBreath 2.2s ease-in-out infinite;
}

.todo-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.todo-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.todo-task-editor {
  display: grid;
  gap: 8px;
}

.todo-task-import {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.todo-task-import input[type='file'] {
  max-width: 100%;
}

.todo-task-rows {
  display: grid;
  gap: 8px;
}

.task-form-row .flatpickr-wrapper,
.sw-task-dates .flatpickr-wrapper {
  width: 100%;
}

.task-form-row .flatpickr-wrapper,
.sw-task-dates .flatpickr-wrapper {
  position: relative;
  z-index: 20;
}

.task-form-row .flatpickr-calendar,
.sw-task-dates .flatpickr-calendar {
  z-index: 100010 !important;
}

.sw-task-form,
.sw-task-dates,
.sw-task-dates > div {
  position: relative;
  overflow: visible;
}

.swal-ios .swal2-actions {
  position: static;
  z-index: auto;
}

.task-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(140px, 0.7fr) minmax(140px, 0.7fr) auto;
  gap: 8px;
  align-items: center;
  position: relative;
  overflow: visible;
}

.task-form-row > * {
  min-width: 0;
}

.task-form-row textarea[data-task-field='comment'] {
  grid-column: 1 / -1;
  min-height: 84px;
  resize: vertical;
  overflow-y: auto;
}

.sw-task-textarea {
  min-height: 110px !important;
  resize: vertical;
  overflow-y: auto !important;
}

@media (max-width: 1100px) {
  .task-form-row {
    grid-template-columns: 1fr 1fr auto;
  }

  .task-form-row input[data-task-field='title'] {
    grid-column: 1 / -1;
  }

  .todo-task-import {
    flex-direction: column;
    align-items: stretch;
  }

  .todo-task-import input[type='file'],
  .todo-task-import .btn {
    width: 100%;
  }

  .todo-task-editor-dates {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 434px) {
  .task-form-row {
    grid-template-columns: 1fr;
  }

  .task-form-row [data-remove-task-row] {
    justify-self: end;
  }

  #todoModal .modal-content {
    max-height: 80vh;
  }

  .modal {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }
}

.todo-inline-message {
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 600;
}

.todo-inline-message.warning {
  color: #8d1f1f;
  background: #ffe7e8;
  border: 1px solid #ffd0d2;
}

.todo-inline-message.success {
  color: #155e2d;
  background: #e3f8e8;
  border: 1px solid #caedd4;
}

.todo-inline-message.info {
  color: #2e2f69;
  background: #ebeeff;
  border: 1px solid #d8ddff;
}

#todoSection {
  min-height: 460px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.created-list {
  margin-top: 8px;
  max-height: 150px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.created-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.created-item .name {
  flex: 1;
  font-size: 13px;
  display: grid;
}

.created-item .name small {
  font-size: 11px;
  color: #6e6b87;
}

.btn-xs {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.footer {
  margin: 14px 16px 20px;
  margin-top: auto;
  border: 1px solid #ffffff;
  border-radius: 22px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(245, 239, 255, 0.82);
}

.footer-brand {
  display: flex;
  gap: 10px;
  align-items: center;
}

.footer .brand-logo {
  width: 140px;
  filter: grayscale(1) opacity(0.55);
}

.footer-brand p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.footer-meta {
  display: flex;
  gap: 12px;
  color: #56506f;
  font-size: 13px;
  flex-wrap: wrap;
}

.scroll-arrows {
  position: fixed;
  right: 14px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  display: grid;
  gap: 10px;
  z-index: 50;
  background: rgba(247, 241, 255, 0.85);
  border: 1px solid #d5d0ed;
  border-radius: 14px;
  padding: 6px;
}

.scroll-arrows .btn {
  transition: transform 0.2s ease, opacity 0.2s ease;
  width: 38px;
  height: 38px;
  justify-content: center;
  padding: 0;
  border-radius: 12px;
  background: #ffffff;
}

.scroll-arrows .btn:hover {
  transform: scale(1.08);
}

@keyframes upcomingGlow {
  0%,
  100% {
    border-color: #7f73ff;
  }
  50% {
    border-color: #4f9cff;
  }
}

@keyframes nearestBreath {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(122, 107, 255, 0.28);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(122, 107, 255, 0.1);
    transform: scale(1.01);
  }
}

@keyframes upcomingAlertPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 159, 67, 0.25);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255, 159, 67, 0.08);
  }
}

@keyframes commentPillBreath {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(236, 78, 112, 0.18);
  }
  50% {
    transform: scale(1.03);
    box-shadow: 0 0 0 6px rgba(236, 78, 112, 0.08);
  }
}

.upload-spinner {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #4f4b7b;
  font-size: 13px;
  width: 100%;
  text-align: center;
}

.upload-spinner:not(.hidden) {
  display: flex;
}

.flatpickr-day {
  position: relative;
}

.flatpickr-calendar {
  z-index: 100000 !important;
  max-width: min(307px, calc(100vw - 24px));
}

.swal2-container {
  z-index: 100001 !important;
}

.day-meet-count {
  position: absolute;
  top: 1px;
  right: 1px;
  min-width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #5f5bff;
  color: #fff;
  font-size: 10px;
  line-height: 15px;
  text-align: center;
  font-weight: 700;
}

.next-meeting-counter {
  margin-left: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.quick-filters-fade {
  display: none;
}

.swal-ios {
  border-radius: 24px !important;
  box-shadow: 0 16px 60px rgba(23, 22, 36, 0.22) !important;
  overflow: visible !important;
}

.swal-ios .swal2-html-container {
  position: relative;
  z-index: 20;
  overflow: visible !important;
}

.swal-ios .flatpickr-calendar,
.swal2-container .flatpickr-calendar {
  z-index: 100050 !important;
}

.swal-ios .swal2-title {
  font-size: 22px !important;
}

.swal-ios-btn {
  border-radius: 999px !important;
  padding: 10px 18px !important;
}

.swal-ios-btn-cancel {
  color: #272538 !important;
}

.sw-task-form {
  text-align: left;
  display: grid;
  gap: 8px;
}

.sw-task-label {
  font-size: 12px;
  color: #66678a;
  font-weight: 700;
}

.sw-task-input.swal2-input {
  width: 100% !important;
  margin: 0 !important;
  font-size: 15px !important;
}

.sw-task-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 560px) {
  .sw-task-dates {
    grid-template-columns: 1fr;
  }

  #todoModal {
    width: calc(100vw - 24px);
  }
}

@media (max-width: 1080px) {
  .meetings-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-form {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }

  .scroll-arrows {
    display: none;
  }
}

@media (max-width: 720px) {
  body {
    padding-top: 170px;
  }

  .container {
    padding: 0 12px 16px;
  }

  .meetings-list {
    grid-template-columns: 1fr;
  }

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

  .quick-filters-wrap {
    position: relative;
    padding: 0 0 2px;
    width: 100%;
    overflow: hidden;
  }

  .quick-filters {
    display: flex;
    gap: 8px;
    margin: 0 -2px 6px;
    width: calc(100% + 4px);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 2px 4px;
  }

  .quick-filters::-webkit-scrollbar {
    display: none;
  }

  .quick-filter {
    flex: 0 0 auto;
    justify-content: flex-start;
    white-space: nowrap;
  }

  .quick-filters-fade {
    display: none;
  }

  
  .filter {
    width: 100%;
  }

  .filter input,
  .filter select,
  .filter button {
    flex: 1 1 100%;
    min-width: 0;
  }

  .task-form-row {
    grid-template-columns: 1fr;
  }

  .footer {
    margin: 14px 0 0;
    width: 100%;
    border-radius: 18px 18px 0 0;
  }

  #meetingFormSection {
    scroll-margin-top: 220px;
  }

  .menu-actions .btn {
    padding: 10px 12px;
  }

  .menu-actions .btn .btn-label {
    display: none;
  }

  .menu-actions .btn i {
    margin: 0;
    font-size: 18px;
  }

  .menu-actions .btn .sharepoint-logo {
    width: 18px;
    height: 18px;
  }

  .menu-separator {
    height: 20px;
  }
}

.slack-notify-box {
  border: 1px solid #d8d3ef;
  border-radius: 14px;
  padding: 10px 12px;
  background: #faf9ff;
  display: grid;
  gap: 10px;
}

.slack-check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: #3f3965;
  font-weight: 600;
}

.slack-check input {
  width: 16px;
  height: 16px;
}

@keyframes recPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 53, 79, 0.28);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255, 53, 79, 0.08);
  }
}

@keyframes recDotPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 53, 79, 0.45);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 53, 79, 0);
  }
}
