:root {
  color-scheme: dark;
  --bg: #0f172a;
  --panel: #1e293b;
  --panel-soft: rgba(30, 41, 59, 0.72);
  --panel-strong: rgba(30, 41, 59, 0.94);
  --surface: rgba(15, 23, 42, 0.82);
  --line: rgba(148, 163, 184, 0.22);
  --line-strong: rgba(148, 163, 184, 0.34);
  --muted: #94a3b8;
  --text: #e2e8f0;
  --white: #f8fafc;
  --primary: #3b82f6;
  --primary-dark: #1d4ed8;
  --accent: #10b981;
  --warning: #eab308;
  --danger: #ef4444;
  --purple: #8b5cf6;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(30, 41, 59, 0.9) 1px, transparent 1px);
  background-size: 30px 30px;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

::selection {
  background: var(--primary);
  color: white;
}

a,
button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.app-shell {
  min-height: 100vh;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(51, 65, 85, 0.95);
  background: rgba(30, 41, 59, 0.9);
  backdrop-filter: blur(16px);
}

.brand-mark {
  display: inline-flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 14px 30px rgba(59, 130, 246, 0.22);
}

.page-kicker {
  color: var(--primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.glass-card,
.panel-card,
.app-card,
.stat-card,
.data-card {
  border: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: 0 16px 36px rgba(2, 6, 23, 0.2);
}

.glass-card,
.panel-card,
.app-card,
.stat-card,
.data-card,
.input-dark,
.btn-primary,
.btn-secondary,
.badge,
.calendar-day,
.video-shell {
  border-radius: 0.5rem;
}

.glass-card {
  background: rgba(30, 41, 59, 0.86);
  backdrop-filter: blur(18px);
}

.panel-card {
  position: relative;
  overflow: hidden;
}

.app-card {
  position: relative;
  display: flex;
  min-height: 13.75rem;
  flex-direction: column;
  overflow: hidden;
}

.app-card::after {
  content: "";
  position: absolute;
  inset: auto -3.5rem -4rem auto;
  width: 9rem;
  height: 9rem;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.04;
  pointer-events: none;
}

.app-card:hover {
  transform: translateY(-5px);
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 22px 48px rgba(59, 130, 246, 0.16);
}

.card-blue {
  color: var(--primary);
}

.card-purple {
  color: var(--purple);
}

.card-red {
  color: var(--danger);
}

.card-green {
  color: var(--accent);
}

.icon-box {
  display: inline-flex;
  height: 3rem;
  width: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid rgba(59, 130, 246, 0.28);
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  font-size: 1.25rem;
}

.icon-box.green {
  border-color: rgba(16, 185, 129, 0.28);
  background: rgba(16, 185, 129, 0.13);
  color: #34d399;
}

.icon-box.purple {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.13);
  color: #a78bfa;
}

.icon-box.red {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.13);
  color: #f87171;
}

.icon-box.yellow {
  border-color: rgba(234, 179, 8, 0.3);
  background: rgba(234, 179, 8, 0.13);
  color: #facc15;
}

.input-dark {
  width: 100%;
  border: 1px solid rgba(71, 85, 105, 0.95);
  background: rgba(15, 23, 42, 0.72);
  color: var(--white);
  padding: 0.85rem 1rem;
  outline: none;
  transition: border 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input-dark::placeholder {
  color: #64748b;
}

.input-dark:focus {
  border-color: rgba(59, 130, 246, 0.82);
  background: rgba(15, 23, 42, 0.92);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid rgba(96, 165, 250, 0.4);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  cursor: pointer;
  font-weight: 800;
  min-height: 2.75rem;
  padding: 0.78rem 1.05rem;
  box-shadow: 0 14px 30px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(59, 130, 246, 0.26);
}

.btn-secondary {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid rgba(100, 116, 139, 0.72);
  background: rgba(15, 23, 42, 0.56);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  padding: 0.68rem 0.95rem;
}

.btn-secondary:hover {
  border-color: rgba(96, 165, 250, 0.56);
  background: rgba(51, 65, 85, 0.82);
  color: white;
}

.icon-button {
  display: inline-flex;
  height: 2.5rem;
  width: 2.5rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(100, 116, 139, 0.6);
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.5);
  color: #94a3b8;
}

.icon-button:hover {
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(100, 116, 139, 0.72);
  background: rgba(15, 23, 42, 0.54);
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.34rem 0.6rem;
}

.badge-admin {
  border-color: rgba(234, 179, 8, 0.28);
  background: rgba(234, 179, 8, 0.1);
  color: #facc15;
}

.badge-user {
  border-color: rgba(16, 185, 129, 0.28);
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 185, 129, 0.24);
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.28rem 0.58rem;
}

.status-pill.warning {
  border-color: rgba(234, 179, 8, 0.26);
  background: rgba(234, 179, 8, 0.1);
  color: #facc15;
}

.status-pill.danger {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
}

.status-dot {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.08);
}

.stat-card {
  padding: 1.1rem;
}

.stat-label {
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

.stat-number {
  color: white;
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.stat-subtext {
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.72rem;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: white;
  font-size: 1.1rem;
  font-weight: 850;
}

.data-card {
  background: rgba(15, 23, 42, 0.42);
  padding: 1rem;
}

.table-row {
  border-bottom: 1px solid rgba(100, 116, 139, 0.24);
}

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

.video-shell {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(71, 85, 105, 0.92);
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.7)),
    repeating-linear-gradient(90deg, rgba(148, 163, 184, 0.06) 0 1px, transparent 1px 8px);
}

.calendar-day {
  min-height: 10rem;
  border: 1px solid rgba(100, 116, 139, 0.26);
  background: rgba(30, 41, 59, 0.78);
  padding: 1rem;
  box-shadow: 0 16px 30px rgba(2, 6, 23, 0.16);
}

.toast {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 100;
  max-width: 28rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(100, 116, 139, 0.34);
  background: rgba(30, 41, 59, 0.96);
  color: #e5e7eb;
  padding: 0.95rem 1rem;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
}

.notification-dot {
  position: absolute;
  right: -0.35rem;
  top: -0.35rem;
  min-width: 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--panel);
  border-radius: 999px;
  background: var(--danger);
  color: white;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  padding: 0 0.25rem;
}

.hidden-by-role {
  display: none !important;
}

.hidden {
  display: none !important;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.6rem;
  border: 1px solid rgba(100, 116, 139, 0.55);
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.48);
  color: #cbd5e1;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 850;
  padding: 0.7rem 0.95rem;
}

.tab-button:hover,
.tab-button.active {
  border-color: rgba(59, 130, 246, 0.62);
  background: rgba(59, 130, 246, 0.14);
  color: white;
}

.team-card {
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 0.5rem;
  background: rgba(30, 41, 59, 0.86);
  box-shadow: 0 16px 32px rgba(2, 6, 23, 0.18);
  overflow: hidden;
}

.team-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid rgba(100, 116, 139, 0.22);
  padding: 1rem;
}

.member-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  padding: 1rem;
}

.member-card {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.42);
  color: inherit;
  cursor: pointer;
  padding: 0.85rem;
  text-align: left;
}

.member-card:hover,
.member-card.active {
  border-color: rgba(59, 130, 246, 0.62);
  background: rgba(59, 130, 246, 0.12);
  transform: translateY(-2px);
}

.avatar {
  display: inline-flex;
  width: 2.7rem;
  height: 2.7rem;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 0.5rem;
  background: rgba(59, 130, 246, 0.14);
  color: #bfdbfe;
  font-weight: 900;
}

.profile-stat {
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.42);
  padding: 0.85rem;
}

.planner-full-bleed {
  margin-left: calc(50% - 50vw + 1rem);
  width: calc(100vw - 2rem);
}

@media (min-width: 640px) {
  .planner-full-bleed {
    margin-left: calc(50% - 50vw + 1.5rem);
    width: calc(100vw - 3rem);
  }
}

@media (min-width: 1024px) {
  .planner-full-bleed {
    margin-left: calc(50% - 50vw + 2rem);
    width: calc(100vw - 4rem);
  }
}

.planner-shell {
  display: grid;
  height: calc(100vh - 12rem);
  min-height: 42rem;
  overflow: hidden;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 0.5rem;
  background: rgba(30, 41, 59, 0.86);
  box-shadow: 0 20px 44px rgba(2, 6, 23, 0.2);
}

@media (min-width: 1024px) {
  .planner-shell {
    grid-template-columns: minmax(20rem, 23rem) minmax(0, 1fr);
  }
}

.planner-sidebar {
  display: flex;
  min-height: 36rem;
  flex-direction: column;
  border-bottom: 1px solid rgba(100, 116, 139, 0.24);
  background: rgba(15, 23, 42, 0.46);
}

@media (min-width: 1024px) {
  .planner-sidebar {
    border-right: 1px solid rgba(100, 116, 139, 0.24);
    border-bottom: 0;
  }
}

.planner-header {
  padding: 1rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.24), rgba(30, 41, 59, 0.84));
  border-bottom: 1px solid rgba(100, 116, 139, 0.24);
}

.planner-header h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  color: white;
  font-size: 1.05rem;
  font-weight: 900;
}

.planner-header p {
  margin: 0.45rem 0 0;
  color: #cbd5e1;
  font-size: 0.82rem;
  line-height: 1.5;
}

.upload-grid {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px dashed rgba(147, 197, 253, 0.42);
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.34);
  color: #dbeafe;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 0.78rem;
  user-select: none;
}

.upload-btn:hover {
  border-color: rgba(147, 197, 253, 0.74);
  background: rgba(59, 130, 246, 0.16);
}

.upload-btn input[type="file"] {
  display: none;
}

.planner-controls {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  border-bottom: 1px solid rgba(100, 116, 139, 0.24);
  background: rgba(15, 23, 42, 0.36);
  padding: 1rem;
}

.search-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.search {
  min-width: 0;
  flex: 1;
  border: 1px solid rgba(71, 85, 105, 0.95);
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.68);
  color: white;
  font-size: 0.86rem;
  outline: none;
  padding: 0.72rem 0.85rem;
}

.search:focus {
  border-color: rgba(59, 130, 246, 0.82);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.planner-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid rgba(100, 116, 139, 0.55);
  border-radius: 0.5rem;
  background: rgba(30, 41, 59, 0.82);
  color: #e2e8f0;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
  min-height: 2.45rem;
  padding: 0.65rem 0.8rem;
  white-space: nowrap;
}

.planner-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.planner-btn-primary {
  border-color: rgba(96, 165, 250, 0.45);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}

.planner-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #cbd5e1;
  cursor: pointer;
  font-size: 0.84rem;
  user-select: none;
}

.status {
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.42);
  color: #94a3b8;
  font-size: 0.78rem;
  line-height: 1.45;
  padding: 0.75rem;
}

.status strong {
  color: #e2e8f0;
}

#course-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.8rem;
}

.planner-empty {
  color: #94a3b8;
  font-size: 0.9rem;
  padding: 1.5rem 1rem;
  text-align: center;
}

.course-card {
  overflow: hidden;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 0.5rem;
  background: rgba(30, 41, 59, 0.82);
  margin-bottom: 0.7rem;
}

.course-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.7rem;
  cursor: pointer;
  padding: 0.8rem;
}

.course-header:hover {
  background: rgba(59, 130, 246, 0.09);
}

.course-title {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.22rem;
}

.course-title .code {
  color: white;
  font-weight: 900;
}

.course-title .name {
  max-width: 18rem;
  overflow: hidden;
  color: #94a3b8;
  font-size: 0.78rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-sections {
  display: none;
  border-top: 1px solid rgba(100, 116, 139, 0.2);
}

.course-card.active .course-sections {
  display: block;
}

.section-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  border-bottom: 1px solid rgba(100, 116, 139, 0.16);
  color: #cbd5e1;
  font-size: 0.8rem;
  padding: 0.75rem 0.8rem;
}

.section-item:hover {
  background: rgba(15, 23, 42, 0.34);
}

.section-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.24rem;
}

.section-info strong {
  color: #f8fafc;
  font-size: 0.8rem;
  line-height: 1.3;
  word-break: break-word;
}

.instructor,
.mini {
  color: #94a3b8;
  font-size: 0.74rem;
}

.tag {
  width: fit-content;
  border: 1px solid rgba(100, 116, 139, 0.35);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.44);
  color: #cbd5e1;
  font-size: 0.64rem;
  margin-top: 0.25rem;
  padding: 0.16rem 0.42rem;
}

.planner-calendar {
  display: flex;
  height: 100%;
  min-height: 0;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.28);
}

.cal-headbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  width: max-content;
  min-width: 100%;
  border-bottom: 1px solid rgba(100, 116, 139, 0.34);
  background: rgba(30, 41, 59, 0.96);
  will-change: transform;
}

.cal-headbar .time-col-head {
  width: 70px;
  height: 44px;
  border-right: 1px solid rgba(100, 116, 139, 0.28);
}

.cal-headbar .day-head {
  display: flex;
  min-width: 15rem;
  flex: 1;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(100, 116, 139, 0.28);
  color: #e2e8f0;
  font-size: 0.84rem;
  font-weight: 900;
  height: 44px;
}

.cal-body-wrap {
  flex: 1;
  overflow: auto;
}

.cal-body {
  position: relative;
  display: flex;
  width: max-content;
  min-width: 100%;
}

.time-col {
  position: relative;
  width: 70px;
  flex: 0 0 auto;
  border-right: 1px solid rgba(100, 116, 139, 0.28);
  background: rgba(15, 23, 42, 0.56);
}

.time-label {
  position: absolute;
  left: 0;
  right: 0;
  padding-left: 0.5rem;
  color: #94a3b8;
  font-size: 0.75rem;
  transform: translateY(-50%);
  white-space: nowrap;
}

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

.day-col {
  position: relative;
  min-width: 15rem;
  flex: 1;
  border-right: 1px solid rgba(100, 116, 139, 0.18);
  background: rgba(15, 23, 42, 0.26);
}

.hline {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(148, 163, 184, 0.13);
  pointer-events: none;
}

.event {
  position: absolute;
  z-index: 5;
  overflow: hidden;
  cursor: pointer;
  border-left: 3px solid rgba(255, 255, 255, 0.35);
  border-radius: 0.5rem;
  color: white;
  font-size: 0.75rem;
  line-height: 1.25;
  padding: 0.45rem 0.5rem;
  box-shadow: 0 6px 18px rgba(2, 6, 23, 0.22);
  transition: all 0.2s ease;
}

.event:hover {
  z-index: 50 !important;
  height: auto !important;
  transform: scale(1.025);
  box-shadow: 0 12px 28px rgba(2, 6, 23, 0.34);
}

.event.conflict {
  outline: 2px solid rgba(248, 113, 113, 0.82);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.65), 0 10px 24px rgba(2, 6, 23, 0.3);
}

.event .badge {
  display: inline-block;
  margin-top: 0.35rem;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.9);
  font-size: 0.62rem;
  padding: 0.12rem 0.4rem;
}

.ev-teacher,
.ev-time {
  display: block;
  overflow: hidden;
  margin-top: 0.25rem;
  opacity: 0.95;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c-0 { background: #2563eb; }
.c-1 { background: #dc2626; }
.c-2 { background: #059669; }
.c-3 { background: #7c3aed; }
.c-4 { background: #d97706; }
.c-5 { background: #334155; }
.c-6 { background: #0f766e; }
.c-7 { background: #c2410c; }

.btn-primary:disabled,
.btn-secondary:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
  box-shadow: none;
}

.google-calendar-full {
  width: 100%;
}

.google-calendar-shell {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 1024px) {
  .google-calendar-shell {
    grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr);
    align-items: start;
  }
}

.google-calendar-main {
  min-width: 0;
}

.calendar-field-label {
  display: grid;
  gap: 0.45rem;
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 850;
}

.calendar-sync-status {
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.48);
  color: #94a3b8;
  font-size: 0.82rem;
  line-height: 1.55;
  padding: 0.85rem;
}

.calendar-sync-status.ready {
  border-color: rgba(16, 185, 129, 0.26);
  background: rgba(16, 185, 129, 0.09);
  color: #bbf7d0;
}

.calendar-sync-status.warning {
  border-color: rgba(234, 179, 8, 0.3);
  background: rgba(234, 179, 8, 0.09);
  color: #fde68a;
}

.calendar-member-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.calendar-member-card {
  display: flex;
  min-height: 7.25rem;
  width: 100%;
  align-items: flex-start;
  gap: 0.8rem;
  border: 1px solid rgba(100, 116, 139, 0.24);
  border-radius: 0.5rem;
  background: rgba(30, 41, 59, 0.78);
  color: inherit;
  cursor: pointer;
  padding: 0.95rem;
  text-align: left;
  box-shadow: 0 14px 32px rgba(2, 6, 23, 0.16);
}

.calendar-member-card:hover,
.calendar-member-card.active {
  border-color: rgba(59, 130, 246, 0.64);
  background: rgba(59, 130, 246, 0.12);
  transform: translateY(-2px);
}

.calendar-member-card .avatar {
  width: 2.55rem;
  height: 2.55rem;
}

.calendar-member-info {
  min-width: 0;
  flex: 1;
}

.calendar-member-name {
  overflow: hidden;
  color: white;
  font-size: 0.92rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-member-meta {
  margin-top: 0.25rem;
  overflow: hidden;
  color: #94a3b8;
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-member-state {
  margin-top: 0.7rem;
  width: fit-content;
}

.calendar-sync-list,
.calendar-event-list {
  display: grid;
  gap: 0.75rem;
}

.calendar-sync-item,
.calendar-event-card {
  border: 1px solid rgba(100, 116, 139, 0.22);
  border-radius: 0.5rem;
  background: rgba(15, 23, 42, 0.42);
  padding: 0.9rem;
}

.calendar-sync-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
}

.calendar-event-card {
  display: grid;
  gap: 0.45rem;
}

.calendar-event-title {
  color: white;
  font-size: 0.95rem;
  font-weight: 900;
}

.calendar-event-meta {
  color: #94a3b8;
  font-size: 0.78rem;
}

.calendar-empty {
  border: 1px dashed rgba(100, 116, 139, 0.32);
  border-radius: 0.5rem;
  color: #94a3b8;
  font-size: 0.88rem;
  padding: 1rem;
  text-align: center;
}

@media (max-width: 640px) {
  .calendar-sync-item {
    display: grid;
  }

  .calendar-sync-item .btn-secondary {
    width: 100%;
  }
}
