/* ─── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #fff;
  --surface: #f8f9fa;
  --border: #dadce0;
  --text-primary: #3c4043;
  --text-secondary: #70757a;
  --text-on-color: #fff;
  --today-bg: #1a73e8;
  --today-text: #fff;
  --header-h: 60px;
  --legend-h: 36px;
  --allday-h: auto;
  --day-col-h: 32px;
  --time-col-w: 56px;
  --hour-h: 60px;
  --hours: 24;
  --grid-h: calc(var(--hour-h) * var(--hours));
}

body {
  font-family: "Roboto", sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── Top Header ────────────────────────────────────────────── */
.top-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg);
  position: relative;
  z-index: 10;
}

.nav-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-logo {
  height: 50px;
  width: auto;
  cursor: pointer;
  object-fit: contain;
  transition: opacity 0.2s;
}

.header-logo:hover {
  opacity: 0.8;
}

.nav-btn {
  background: none;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background 0.15s;
}

.nav-btn:hover {
  background: #f1f3f4;
}

.nav-btn svg {
  width: 20px;
  height: 20px;
}

.month-label {
  font-family: "Google Sans", sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--text-primary);
  min-width: 200px;
  text-align: center;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.connect-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  font-family: "Google Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #1a73e8;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  text-decoration: none;
}

.connect-btn:hover {
  background: #e8f0fe;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.connect-btn svg {
  width: 16px;
  height: 16px;
}

/* ─── Legend Bar ────────────────────────────────────────────── */
.legend-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px 0 calc(var(--time-col-w) + 20px);
  height: var(--legend-h);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--bg);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-empty {
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
}

.legend-item.has-dropdown {
  position: relative;
}
.legend-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.legend-label:hover {
  background: #f1f3f4;
}
.legend-caret {
  width: 14px;
  height: 14px;
  fill: var(--text-secondary);
}
.legend-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 8px 0;
  min-width: 220px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  margin-top: 4px;
}
.legend-dropdown.hidden {
  display: none;
}
.cal-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  cursor: pointer;
}
.cal-checkbox-label:hover {
  background: #f1f3f4;
}
.cal-name {
  color: var(--text-main);
  font-family: "Google Sans", sans-serif;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}
.sync-legends-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: white;
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 4px 12px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  height: 28px;
}
.sync-legends-btn:hover {
  background: #f1f3f4;
}

/* ─── Calendar Body ─────────────────────────────────────────── */
.cal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.day-header-row {
  display: flex;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: relative;
  z-index: 5;
}

.time-gutter-header {
  width: var(--time-col-w);
  min-width: var(--time-col-w);
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 4px 6px;
  font-size: 10px;
  color: var(--text-secondary);
  border-right: 1px solid var(--border);
  user-select: none;
}

.day-col-header {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 4px;
  border-right: 1px solid var(--border);
  cursor: default;
}

.day-col-header:last-child {
  border-right: none;
}

.day-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.day-col-header.today .day-name {
  color: #1a73e8;
}

.day-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Google Sans", sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: var(--text-primary);
}

.day-col-header.today .day-number {
  background: #1a73e8;
  color: #fff;
}

/* ─── All-day row ────────────────────────────────────────────── */
.allday-row {
  display: flex;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  min-height: 28px;
}

.allday-gutter {
  width: var(--time-col-w);
  min-width: var(--time-col-w);
  border-right: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  font-size: 10px;
  color: var(--text-secondary);
  user-select: none;
  flex-shrink: 0;
}

.allday-cols {
  flex: 1;
  display: flex;
}

.allday-cell {
  flex: 1;
  min-height: 28px;
  border-right: 1px solid var(--border);
  padding: 2px 2px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.allday-cell:last-child {
  border-right: none;
}

.allday-chip {
  display: block;
  border-radius: 3px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 18px;
}

/* ─── Scrollable Grid ────────────────────────────────────────── */
.grid-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.grid-inner {
  display: flex;
  height: var(--grid-h);
  position: relative;
}

.time-gutter {
  width: var(--time-col-w);
  min-width: var(--time-col-w);
  flex-shrink: 0;
  position: relative;
  border-right: 1px solid var(--border);
}

.time-label {
  position: absolute;
  right: 6px;
  font-size: 10px;
  color: var(--text-secondary);
  transform: translateY(-50%);
  user-select: none;
  white-space: nowrap;
}

.days-grid {
  flex: 1;
  display: flex;
  position: relative;
}

.day-col {
  flex: 1;
  border-right: 1px solid var(--border);
  position: relative;
}

.day-col:last-child {
  border-right: none;
}

.day-col.today-col {
  background: #f8fbff;
}

.hour-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1px solid #e8eaed;
  pointer-events: none;
}

.hour-line.half {
  border-top: 1px dashed #f1f3f4;
}

/* ─── Current Time Indicator ─────────────────────────────────── */
.now-line {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 4;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.now-line::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d93025;
  flex-shrink: 0;
  margin-left: -5px;
}

.now-line::after {
  content: "";
  flex: 1;
  height: 2px;
  background: #d93025;
}

/* ─── Event Chips ────────────────────────────────────────────── */
.event-chip {
  position: absolute;
  border-radius: 6px;
  padding: 2px 6px;
  overflow: hidden;
  cursor: pointer;
  z-index: 2;
  transition: filter 0.1s, transform 0.1s;
  border-left: 3px solid rgba(0, 0, 0, 0.15);
  min-height: 18px;
}

.event-chip:hover {
  filter: brightness(0.93);
  transform: scale(1.01);
  z-index: 3;
}

.event-chip-title {
  font-size: 11px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.event-chip-time {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.event-chip-meta {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* ─── Loader / Error ─────────────────────────────────────────── */
.status-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.7);
  z-index: 100;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  font-family: "Google Sans", sans-serif;
  color: var(--text-secondary);
  font-size: 15px;
}

.status-overlay.visible {
  display: flex;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid #e8eaed;
  border-top-color: #1a73e8;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ─── Hover Popup ─────────────────────────────────────────────── */
.event-popup {
  position: fixed;
  z-index: 999;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18), 0 1px 6px rgba(0, 0, 0, 0.12);
  padding: 14px 16px;
  min-width: 220px;
  max-width: 300px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
  font-family: "Roboto", sans-serif;
}

.event-popup.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.popup-color-bar {
  width: 100%;
  height: 4px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.popup-title {
  font-family: "Google Sans", sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #3c4043;
  margin-bottom: 8px;
  line-height: 1.3;
}

.popup-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 5px;
  font-size: 13px;
  color: #5f6368;
  line-height: 1.4;
}

.popup-row svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 1px;
  fill: #70757a;
}

/* ─── Profile & Hamburger Menu ──────────────────────────────── */
.header-profile {
  position: relative;
}

.profile-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background 0.15s, box-shadow 0.15s;
}

.profile-btn:hover {
  background: #f1f3f4;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  color: var(--text-primary);
}

.profile-btn svg {
  width: 28px;
  height: 28px;
}

.profile-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  width: 280px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.15s ease, transform 0.15s ease;
  overflow: hidden;
}

.profile-dropdown.hidden {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}

.dropdown-header {
  padding: 12px 16px;
  font-family: "Google Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  background: #f8f9fa;
}

.account-list {
  max-height: 240px;
  overflow-y: auto;
}

.account-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.account-item:last-child {
  border-bottom: none;
}

.acc-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  flex-shrink: 0;
}

.acc-info {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.acc-email {
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.primary-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: #1a73e8;
  background: #e8f0fe;
  padding: 3px 8px;
  border-radius: 12px;
  margin-top: 4px;
  width: fit-content;
}

.dropdown-actions {
  display: flex;
  flex-direction: column;
  padding: 8px;
  background: #f8f9fa;
  border-top: 1px solid var(--border);
  gap: 4px;
}

.dropdown-connect {
  border: none;
  background: transparent;
  width: 100%;
  justify-content: flex-start;
  padding: 10px 16px;
  border-radius: 4px;
}
.dropdown-connect:hover {
  background: #e8f0fe;
  box-shadow: none;
}

.logout-btn {
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-family: "Google Sans", sans-serif;
  font-weight: 500;
  color: #d93025;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logout-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}
.logout-btn:hover {
  background: #fce8e6;
}

.remove-acc-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.remove-acc-btn:hover {
  background: #fce8e6;
  color: #d93025;
}

.remove-acc-btn svg {
  width: 18px;
  height: 18px;
}

.account-item-wrapper {
  border-bottom: 1px solid var(--border);
}
.account-item-wrapper:last-child {
  border-bottom: none;
}
.account-item-wrapper .account-item {
  border-bottom: none;
}
.account-item.revoked-acc {
  opacity: 0.6;
}
.action-required-msg {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px 12px;
  font-size: 12px;
  color: #d93025;
  background: #fdf3f2;
}
.action-required-msg span {
  font-weight: 500;
}
.reconnect-btn {
  background: #d93025;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.reconnect-btn:hover {
  background: #b3261e;
}

/* ─── Settings Modal ─────────────────────────────────────────── */
.settings-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.2s;
}

.settings-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.settings-modal {
  background: #fff;
  border-radius: 12px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
  transform: translateY(0);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.settings-overlay.hidden .settings-modal {
  transform: translateY(20px);
}

.settings-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  background: #f8f9fa;
}

.settings-modal-header h3 {
  font-family: "Google Sans", sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #202124;
}

.settings-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  transition: color 0.15s;
}

.settings-close-btn:hover {
  color: #202124;
}

.settings-modal-body {
  padding: 24px;
}

.settings-info-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #e8f0fe;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.settings-info-box svg {
  width: 24px;
  height: 24px;
  fill: #1a73e8;
  flex-shrink: 0;
  margin-top: 2px;
}

.settings-info-box p {
  font-size: 13px;
  color: #1a73e8;
  line-height: 1.5;
  margin: 0;
}

.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-group input {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: monospace;
  color: #202124;
  outline: none;
  transition: border-color 0.15s;
}

.form-group input:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.settings-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
}

.settings-status-msg {
  font-size: 13px;
  font-weight: 500;
}

.settings-status-msg.success {
  color: #0f9d58;
}

.settings-status-msg.error {
  color: #d93025;
}

.settings-save-btn {
  background: #1a73e8;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  font-family: "Google Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
}

.settings-save-btn:hover {
  background: #1557b0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.settings-save-btn:disabled {
  background: #dadce0;
  cursor: not-allowed;
  box-shadow: none;
}

/* ─── Settings Button in Dropdown ─────────────────────────────── */
.settings-btn {
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 400;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-btn:hover {
  background: #f1f3f4;
}

.settings-btn svg {
  width: 16px;
  height: 16px;
  fill: var(--text-secondary);
}

/* ─── Event Detail Modal ──────────────────────────────────────── */
.detail-modal-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.2s;
}

.detail-modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.detail-modal {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 448px;
  box-shadow: 0 24px 38px 3px rgba(0,0,0,0.14),0 9px 46px 8px rgba(0,0,0,0.12),0 11px 15px -7px rgba(0,0,0,0.2);
  transform: scale(1);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  font-family: 'Roboto', sans-serif;
}

.detail-modal-overlay.hidden .detail-modal {
  transform: scale(0.95);
}

.detail-modal-header {
  padding: 16px 24px 12px 64px;
  position: relative;
}

.detail-modal-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
}

.detail-action-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #5f6368;
  cursor: pointer;
  transition: background 0.15s;
}

.detail-action-icon:hover {
  background: #f1f3f4;
  color: #202124;
}

.detail-action-icon svg {
  width: 20px;
  height: 20px;
}

.detail-title {
  font-family: "Google Sans", sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: #3c4043;
  margin-bottom: 4px;
  padding-right: 48px;
}

.detail-time {
  font-size: 14px;
  color: #3c4043;
}

.detail-modal-body {
  padding: 8px 0 24px;
}

.detail-row {
  display: flex;
  padding: 8px 24px;
}

.detail-row.hidden {
  display: none !important;
}

/* Validation Styles */
.invalid-input {
  border-bottom: 2px solid #d93025 !important;
  color: #d93025 !important;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.detail-icon {
  width: 40px;
  flex-shrink: 0;
  display: flex;
  padding-top: 2px;
}

.detail-icon svg {
  width: 20px;
  height: 20px;
}

.detail-content {
  flex: 1;
}

.detail-text {
  font-size: 14px;
  color: #3c4043;
  line-height: 20px;
}

.detail-subtext {
  font-size: 12px;
  color: #5f6368;
  margin-top: 2px;
}

.meet-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1a73e8;
  color: #fff;
  border-radius: 4px;
  padding: 8px 24px;
  font-family: "Google Sans", sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, box-shadow 0.15s;
  margin-bottom: 4px;
}

.meet-btn:hover {
  background: #1557b0;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3),0 1px 3px 1px rgba(60,64,67,0.15);
}

.guest-list {
  margin-top: 12px;
}

.guest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.guest-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e9edf4;
  color: #1a73e8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-family: "Google Sans", sans-serif;
  font-weight: 500;
}

.guest-name-col {
  display: flex;
  flex-direction: column;
}

.guest-name {
  font-size: 14px;
  color: #3c4043;
}

.guest-status {
  font-size: 12px;
  color: #5f6368;
  text-transform: capitalize;
}

.detail-desc {
  font-size: 14px;
  color: #3c4043;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-desc a {
  color: #1a73e8;
  text-decoration: underline;
}

/* ─── Instructions Modal ──────────────────────────────────────── */
.instructions-modal-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.2s;
}

.instructions-modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.instructions-modal {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 660px;
  max-height: 90vh;
  box-shadow: 0 24px 38px 3px rgba(0,0,0,0.14),0 9px 46px 8px rgba(0,0,0,0.12),0 11px 15px -7px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  transform: scale(1);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.instructions-modal-overlay.hidden .instructions-modal {
  transform: scale(0.95);
}

.instructions-modal-header {
  padding: 24px 24px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #e0e0e0;
}

.instructions-modal-body {
  padding: 24px;
  overflow-y: auto;
  color: #3c4043;
  font-size: 14px;
  line-height: 1.6;
}

.instructions-lead {
  margin-top: 0;
  margin-bottom: 24px;
  font-size: 15px;
}

.instruction-step {
  margin-bottom: 24px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e8eaed;
}

.instruction-step h4 {
  margin: 0 0 12px 0;
  color: #1a73e8;
  font-family: "Google Sans", sans-serif;
  font-size: 16px;
}

.instruction-step ol {
  margin: 0;
  padding-left: 20px;
}

.instruction-step li {
  margin-bottom: 6px;
}

.instruction-step code {
  background: #e8eaed;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 13px;
  color: #d93025;
}

.instructions-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: flex-end;
}

.info-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #1a73e8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 50%;
  margin-left: 8px;
  transition: background 0.2s;
}

.info-icon-btn:hover {
  background: #e8f0fe;
}

.info-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ─── Calendar Selection Modal ──────────────────────────────────────── */
.calendar-selection-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 4000;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.2s;
}

.calendar-selection-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.calendar-selection-modal {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 24px 38px 3px rgba(0,0,0,0.14),0 9px 46px 8px rgba(0,0,0,0.12),0 11px 15px -7px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
}

.calendar-selection-header {
  padding: 24px 24px 16px;
  border-bottom: 1px solid #e0e0e0;
}

.calendar-selection-body {
  padding: 24px;
}

.selection-checkbox-row {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.selection-checkbox-row:last-child {
  margin-bottom: 0;
}

.selection-checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #1a73e8;
  margin-right: 12px;
}

.selection-checkbox-row label {
  font-size: 14px;
  color: #3c4043;
  cursor: pointer;
  flex: 1;
}

/* ─── Sidebar Local Checkbox Spinner ──────────────────────────────────────── */
.cal-spin-icon {
  width: 16px;
  height: 16px;
  margin-right: 12px;
  animation: spin 1s linear infinite;
  stroke: #1a73e8;
}

.cal-spin-icon.hidden {
  display: none;
}

.modal-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.2s;
}

.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ─── Native Create Event Modal ───────────────────────────────── */
/* ─── Native Create Event Modal ───────────────────────────────── */
.create-event-modal {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 448px;
  box-shadow: 0 24px 38px 3px rgba(0,0,0,0.14), 0 9px 46px 8px rgba(0,0,0,0.12), 0 11px 15px -7px rgba(0,0,0,0.2);
  padding: 0;
  overflow: hidden;
  font-family: 'Roboto', 'Arial', sans-serif;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-selector-wrapper {
  background: #f1f3f4;
  padding: 2px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

#eventAccount {
  background: transparent;
  border: none;
  font-size: 13px;
  font-weight: 500;
  color: #3c4043;
  outline: none;
  cursor: pointer;
  padding: 6px 32px 6px 8px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%235f6368' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 4px center;
  min-width: 160px;
  height: 32px;
  line-height: normal;
}

.modal-tab {
  background: #e8f0fe;
  border: none;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #1a73e8;
  border-radius: 4px;
}

.modal-title {
  font-size: 18px;
  font-weight: 500;
  color: #3c4043;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: #5f6368;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: #f1f3f4;
}

#createEventForm {
  padding: 0 16px 16px 16px;
}

.title-group {
  margin: 8px 0 20px 40px;
}

#eventTitle {
  width: 100%;
  border: none !important;
  border-bottom: 2px solid #dadce0 !important;
  font-size: 22px;
  padding: 8px 0;
  outline: none !important;
  color: #202124;
  transition: border-color 0.2s;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

#eventTitle:focus {
  border-bottom-color: #1a73e8 !important;
  box-shadow: none !important;
}

.form-row {
  display: flex;
  align-items: center; /* Default centering for single lines */
  gap: 20px;
  padding: 8px 0;
}

.form-row.align-top {
  align-items: flex-start;
}

.form-icon {
  width: 20px;
  height: 20px;
  color: #5f6368;
  flex-shrink: 0;
}

.form-row.align-top .form-icon {
  margin-top: 12px;
}

/* Interactive Schedule Inputs */
.schedule-inputs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.schedule-inputs input {
  border: none;
  background: transparent;
  padding: 6px 8px;
  font-size: 14px;
  color: #3c4043;
  border-radius: 4px;
  cursor: pointer;
  outline: none;
}

.schedule-inputs input:hover {
  background: #f1f3f4;
}

.time-sep {
  color: #70757a;
  font-size: 14px;
}

/* Guest Chips System */
.guest-input-wrapper {
  flex: 1;
}

.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: #f1f3f4;
  padding: 6px 10px;
  border-radius: 4px;
  min-height: 40px;
  align-items: center;
}

.chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #dadce0;
  padding: 2px 8px;
  border-radius: 16px;
  font-size: 13px;
  color: #3c4043;
}

.chip-remove {
  cursor: pointer;
  font-size: 16px;
  color: #5f6368;
  display: flex;
  align-items: center;
}

#eventGuestsInput,
#bookerGuestsInput,
.chips-container input {
  border: none !important;
  background: transparent !important;
  outline: none !important;
  font-size: 14px;
  flex: 1;
  min-width: 100px;
  padding: 4px 0;
  box-shadow: none !important;
  color: #3c4043;
  margin: 0 !important;
}

/* Meet Button Polish */
.google-meet-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1a73e8;
  color: #fff;
  border: 1px solid #1a73e8;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-left: 40px;
  height: 36px;
  white-space: nowrap;
}

.google-meet-btn:hover {
  background: #1557b0;
  border-color: #1557b0;
}

.google-meet-btn.active {
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
}

.google-meet-btn.active .meet-icon path {
  fill: #5f6368;
}

.meet-icon-container {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-row textarea,
.form-row input[type="text"],
.form-row input[type="email"] {
  width: 100%;
  border: none !important;
  background: #f1f3f4 !important;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 14px;
  outline: none !important;
  color: #3c4043;
  resize: none;
  font-family: inherit;
  box-shadow: none !important;
}

.form-row textarea:focus,
.form-row input[type="text"]:focus,
.form-row input[type="email"]:focus {
  background: #ebeeef !important;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 12px;
}

.save-btn {
  background: #1a73e8;
  color: #fff;
  border: none;
  padding: 8px 24px;
  border-radius: 4px;
  font-weight: 500;
  cursor: pointer;
  font-size: 14px;
}

/* ─── Invitation Modal ────────────────────────────────────────── */
.send-invites-modal {
  max-width: 360px;
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.30), 0 2px 6px 2px rgba(60,64,67,0.15);
}

.modal-body p {
  margin: 0;
  font-size: 14px;
  color: #3c4043;
  line-height: 1.5;
}

.text-btn {
  background: none;
  border: none;
  color: #1a73e8;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 4px;
}

.text-btn:hover {
  background: #f6f9fe;
}

.no-border {
  border: none !important;
  margin-top: 16px;
  padding: 0;
}

/* ─── Header Action Button ────────────────────────────────────── */
.header-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1.5px solid #1a73e8;
  color: #1a73e8;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 20px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-right: 12px;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
}

.header-action-btn:hover {
  background: #e8f0fe;
  box-shadow: 0 1px 3px 0 rgba(66,133,244,0.3), 0 4px 10px 2px rgba(66,133,244,0.15);
  border-color: #1a73e8;
}

.header-action-btn:active {
  background: #d2e3fc;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
  transform: translateY(0);
}

.header-action-btn svg {
  width: 20px;
  height: 20px;
}

/* ─── Premium Booking Modals ──────────────────────────────────── */
.booking-modal {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 448px;
  box-shadow: 0 24px 38px 3px rgba(0,0,0,0.14), 0 9px 46px 8px rgba(0,0,0,0.12), 0 11px 15px -7px rgba(0,0,0,0.2);
  padding: 0;
  overflow: hidden;
  font-family: 'Roboto', 'Arial', sans-serif;
}

.booking-modal .settings-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #dadce0;
}

.booking-modal h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: #3c4043;
}

.booking-modal .settings-modal-body {
  padding: 16px 24px 24px 24px;
}

.booking-modal .settings-row {
  margin-bottom: 20px;
}

.booking-modal label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #5f6368;
}

.booking-modal .settings-input,
.booking-modal select {
  width: 100%;
  border: none !important;
  background: #f1f3f4 !important;
  padding: 10px 12px !important;
  border-radius: 4px !important;
  font-size: 14px !important;
  outline: none !important;
  color: #3c4043 !important;
  box-sizing: border-box;
}

.booking-modal select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%235f6368' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  padding-right: 32px !important;
  cursor: pointer;
}

.booking-modal .reconnect-btn,
.booking-modal .save-btn {
  width: 100%;
  background: #1a73e8;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.booking-modal .reconnect-btn:hover {
  background: #1557b0;
}

.booking-modal #copyLinkBtn {
  background: #202124;
}

.booking-modal #copyLinkBtn:hover {
  background: #3c4043;
}

.preview-time-chip {
  display: inline-block;
  background: #e8f0fe;
  color: #1a73e8;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 0;
}

.modal-content.create-event-modal input:not([type="checkbox"]):not([type="radio"]),
.modal-content.create-event-modal textarea {
  font-family: 'Roboto', 'Arial', sans-serif;
}

.modal-content.create-event-modal .modal-tab {
  white-space: nowrap;
}

.restricted-window {
  position: absolute;
  left: 0;
  right: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(0, 0, 0, 0.015),
    rgba(0, 0, 0, 0.015) 10px,
    rgba(0, 0, 0, 0.035) 10px,
    rgba(0, 0, 0, 0.035) 20px
  );
  pointer-events: none;
  z-index: 5;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.profile-img-file {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.profile-btn {
  padding: 0;
  display: flex !important;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
}

.hidden {
  display: none !important;
}