/* ============================================
   SchaffZeit – App / Dashboard Styles
   ============================================ */

.app-body {
  display: flex;
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% 0%, rgba(139, 92, 246, 0.10), transparent 28%),
    var(--gray-50);
}

/* --- Sidebar --- */
.app-sidebar {
  width: 252px;
  background: var(--white);
  border-right: 1px solid var(--gray-100);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.sidebar-logo {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
}

.sidebar-logo .logo {
  font-size: 1.6rem;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  transition:
    color var(--transition),
    background-color var(--transition),
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition);
}

.sidebar-link:hover {
  background: rgba(248, 250, 252, 0.9);
  border-color: var(--gray-100);
  color: var(--gray-900);
  transform: translateX(2px);
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.11), rgba(139, 92, 246, 0.07));
  border-color: rgba(99, 102, 241, 0.22);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 7px 18px rgba(79, 70, 229, 0.09);
  transform: none;
}

.sidebar-link.active::after {
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--brand-gradient);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.10);
  content: "";
}

.sidebar-link.active svg {
  stroke: var(--primary);
}

.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user-link {
  transition: background-color var(--transition);
}

.sidebar-user-link:hover {
  background: rgba(99,102,241,0.06);
}

.sidebar-user-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
}

.sidebar-focus-level {
  margin-top: 2px;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 800;
}

.focus-progress-card {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 20px;
  margin-bottom: 22px;
  padding: 18px 20px;
  border: 1px solid rgba(99,102,241,0.18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 0 0, rgba(129,140,248,0.16), transparent 34%),
    var(--white);
  box-shadow: 0 12px 30px rgba(79,70,229,0.07);
}

.focus-level-orb {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  color: #fff;
  background: var(--brand-gradient);
  box-shadow: 0 10px 24px rgba(99,102,241,0.25);
  font-size: 0.875rem;
  font-weight: 800;
}

.focus-progress-main {
  display: grid;
  gap: 10px;
}

.focus-progress-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.focus-progress-heading > div {
  display: flex;
  flex-direction: column;
}

.focus-progress-heading span {
  color: var(--gray-500);
  font-size: 0.875rem;
  font-weight: 700;
}

.focus-progress-heading strong {
  color: var(--gray-900);
  font-size: 1.08rem;
}

.focus-progress-heading small {
  color: var(--gray-500);
  font-size: 0.875rem;
}

.focus-progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--gray-100);
}

.focus-progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-gradient);
  transition: width 350ms ease;
}

.focus-streak-summary {
  display: flex;
  gap: 8px;
}

.focus-streak-summary > span {
  display: flex;
  min-width: 118px;
  padding: 10px 12px;
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  flex-direction: column;
  color: var(--gray-500);
  background: var(--gray-50);
  font-size: 0.875rem;
  line-height: 1.35;
}

.focus-streak-summary b {
  color: var(--gray-900);
  font-size: 0.875rem;
}

.focus-streak-summary i {
  color: var(--primary);
  font-style: normal;
  font-weight: 700;
}

.profile-level-badge {
  display: inline-flex;
  margin-left: 6px;
  padding: 4px 9px;
  border: 1px solid rgba(99,102,241,0.22);
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-bg);
  font-size: 0.875rem;
  font-weight: 800;
}

/* Focus tiers share one restrained palette across the dashboard, profile and session UI. */
.sidebar-focus-level.focus-tier-bronze { color: #9a5b32; }
.sidebar-focus-level.focus-tier-silver { color: #687586; }
.sidebar-focus-level.focus-tier-gold { color: #a87816; }
.sidebar-focus-level.focus-tier-diamond {
  color: #246b91;
  background: linear-gradient(110deg, #2f7fa8 0%, #55a9c8 48%, #39749d 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.profile-level-badge.focus-tier-bronze,
.focus-partner-level.focus-tier-bronze {
  color: #89502e;
  border-color: rgba(154,91,50,0.34);
  background: rgba(194,126,78,0.12);
}

.profile-level-badge.focus-tier-silver,
.focus-partner-level.focus-tier-silver {
  color: #5f6d7d;
  border-color: rgba(117,132,150,0.34);
  background: rgba(148,163,184,0.14);
}

.profile-level-badge.focus-tier-gold,
.focus-partner-level.focus-tier-gold {
  color: #916713;
  border-color: rgba(187,138,35,0.38);
  background: rgba(218,169,61,0.14);
}

.profile-level-badge.focus-tier-diamond,
.focus-partner-level.focus-tier-diamond {
  color: #245f82;
  border-color: rgba(74,153,190,0.48);
  background: linear-gradient(115deg, rgba(186,230,253,0.42), rgba(240,249,255,0.86), rgba(165,243,252,0.34));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 2px 9px rgba(14,116,144,0.12);
}

.focus-progress-card.focus-tier-bronze {
  border-color: rgba(154,91,50,0.25);
  background: radial-gradient(circle at 0 0, rgba(194,126,78,0.14), transparent 34%), var(--white);
}
.focus-progress-card.focus-tier-bronze .focus-level-orb,
.focus-progress-card.focus-tier-bronze .focus-progress-track > span {
  background: linear-gradient(135deg, #b87345, #85502f);
}
.focus-progress-card.focus-tier-bronze .focus-level-orb { box-shadow: 0 10px 24px rgba(154,91,50,0.22); }

.focus-progress-card.focus-tier-silver {
  border-color: rgba(117,132,150,0.28);
  background: radial-gradient(circle at 0 0, rgba(203,213,225,0.32), transparent 34%), var(--white);
}
.focus-progress-card.focus-tier-silver .focus-level-orb,
.focus-progress-card.focus-tier-silver .focus-progress-track > span {
  background: linear-gradient(135deg, #aeb9c6, #697789);
}
.focus-progress-card.focus-tier-silver .focus-level-orb { box-shadow: 0 10px 24px rgba(100,116,139,0.2); }

.focus-progress-card.focus-tier-gold {
  border-color: rgba(187,138,35,0.28);
  background: radial-gradient(circle at 0 0, rgba(246,204,103,0.2), transparent 34%), var(--white);
}
.focus-progress-card.focus-tier-gold .focus-level-orb,
.focus-progress-card.focus-tier-gold .focus-progress-track > span {
  background: linear-gradient(135deg, #d9ad4a, #9c6d12);
}
.focus-progress-card.focus-tier-gold .focus-level-orb { box-shadow: 0 10px 24px rgba(180,128,23,0.22); }

.focus-progress-card.focus-tier-diamond {
  border-color: rgba(74,153,190,0.42);
  background:
    radial-gradient(circle at 0 0, rgba(125,211,252,0.3), transparent 32%),
    radial-gradient(circle at 100% 0, rgba(207,250,254,0.36), transparent 34%),
    var(--white);
}
.focus-progress-card.focus-tier-diamond .focus-level-orb,
.focus-progress-card.focus-tier-diamond .focus-progress-track > span {
  background: linear-gradient(125deg, #65b7dc 0%, #e0f2fe 48%, #68c7d5 100%);
}
.focus-progress-card.focus-tier-diamond .focus-level-orb {
  color: #174a6a;
  box-shadow: 0 10px 26px rgba(14,116,144,0.24), inset 0 1px 0 rgba(255,255,255,0.9);
}

[data-theme="dark"] .focus-progress-card {
  border-color: #30394d;
  background:
    radial-gradient(circle at 0 0, rgba(129,140,248,0.17), transparent 34%),
    #121827;
}

[data-theme="dark"] .focus-progress-heading strong,
[data-theme="dark"] .focus-streak-summary b { color: #f8fafc; }
[data-theme="dark"] .focus-progress-track,
[data-theme="dark"] .focus-streak-summary > span { border-color: #293144; background: #171d2b; }

[data-theme="dark"] .focus-progress-card.focus-tier-bronze {
  border-color: rgba(194,126,78,0.34);
  background: radial-gradient(circle at 0 0, rgba(154,91,50,0.22), transparent 34%), #121827;
}
[data-theme="dark"] .focus-progress-card.focus-tier-silver {
  border-color: rgba(148,163,184,0.34);
  background: radial-gradient(circle at 0 0, rgba(100,116,139,0.23), transparent 34%), #121827;
}
[data-theme="dark"] .focus-progress-card.focus-tier-gold {
  border-color: rgba(218,169,61,0.34);
  background: radial-gradient(circle at 0 0, rgba(161,110,16,0.24), transparent 34%), #121827;
}
[data-theme="dark"] .focus-progress-card.focus-tier-diamond {
  border-color: rgba(103,209,230,0.48);
  background:
    radial-gradient(circle at 0 0, rgba(14,116,144,0.24), transparent 32%),
    radial-gradient(circle at 100% 0, rgba(21,94,117,0.22), transparent 34%),
    #121827;
}
[data-theme="dark"] .profile-level-badge.focus-tier-bronze,
[data-theme="dark"] .focus-partner-level.focus-tier-bronze { color: #e0a077; }
[data-theme="dark"] .profile-level-badge.focus-tier-silver,
[data-theme="dark"] .focus-partner-level.focus-tier-silver { color: #cbd5e1; }
[data-theme="dark"] .profile-level-badge.focus-tier-gold,
[data-theme="dark"] .focus-partner-level.focus-tier-gold { color: #f2ca70; }
[data-theme="dark"] .profile-level-badge.focus-tier-diamond,
[data-theme="dark"] .focus-partner-level.focus-tier-diamond {
  color: #b9eff8;
  border-color: rgba(103,209,230,0.48);
  background: linear-gradient(115deg, rgba(14,116,144,0.28), rgba(15,47,67,0.44), rgba(8,145,178,0.24));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.14), 0 2px 10px rgba(8,145,178,0.16);
}

@media (max-width: 1120px) {
  .focus-progress-card { grid-template-columns: auto 1fr; }
  .focus-streak-summary { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .focus-progress-card { grid-template-columns: 1fr; }
  .focus-level-orb { width: 64px; height: 64px; }
  .focus-progress-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
  .focus-streak-summary { grid-column: auto; flex-direction: column; }
}

.sidebar-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-900);
}

.sidebar-user-plan {
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  user-select: none;
  -webkit-user-select: none;
}

.sidebar-user-plan::selection {
  color: var(--primary);
  background: transparent;
}

.sidebar-user-plan.is-pro {
  align-self: flex-start;
  margin-top: 2px;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  color: var(--white);
  background: var(--brand-gradient) !important;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2) !important;
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.25;
  text-transform: none;
}

.sidebar-user-plan.is-pro::selection {
  color: var(--white);
  background: transparent;
}

/* --- Main Content --- */
.app-main {
  flex: 1;
  margin-left: 252px;
  padding: 42px 48px 64px;
  max-width: 1440px;
  min-width: 0;
}

.app-main-wide { max-width: 1440px; }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.app-header-panel {
  position: relative;
  overflow: hidden;
  padding: 28px 30px;
  border: 1px solid transparent;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(238,242,255,0.92)) padding-box,
    linear-gradient(135deg, rgba(99,102,241,0.44), rgba(139,92,246,0.24), rgba(99,102,241,0.14)) border-box;
  box-shadow: 0 20px 50px rgba(79,70,229,0.08);
}

.app-header-panel::before {
  position: absolute;
  top: -72px;
  right: 6%;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139,92,246,0.13), rgba(99,102,241,0) 68%);
  content: "";
  pointer-events: none;
}

.app-header-panel > * {
  position: relative;
  z-index: 1;
}

.app-eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.app-title {
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 800;
  margin-bottom: 4px;
}

.app-subtitle {
  font-size: 0.95rem;
  color: var(--gray-500);
}

/* --- Stats Row --- */
.app-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.app-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px;
  background: var(--white);
  border-radius: 20px;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.app-stat-card:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(99,102,241,0.24);
}

.app-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
}

.app-stat-label {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* --- Cards --- */
.app-card {
  background: var(--white);
  border-radius: 22px;
  border: 1px solid var(--gray-100);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.app-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--gray-900);
}

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

.app-card-header h3 {
  margin-bottom: 0;
}

.app-card-link {
  display: block;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--gray-100);
  transition: color var(--transition);
}

.app-card-link:hover {
  color: var(--primary-dark);
}

/* --- Grid --- */
.app-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.dashboard-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.dashboard-week-card .app-stats-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.dashboard-week-card .app-stat-card {
  position: relative;
  overflow: hidden;
  justify-content: center;
  min-height: 112px;
  background: var(--gray-50);
  box-shadow: none;
}

.dashboard-week-card .app-stat-card::before {
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: var(--brand-gradient);
  opacity: 0.58;
  content: "";
}

.dashboard-chart-card {
  background:
    radial-gradient(circle at 88% 12%, rgba(99,102,241,0.08), transparent 34%),
    var(--white);
}

.dashboard-week-card .app-stat-icon {
  display: none;
}

.dashboard-week-card .app-stat-content {
  text-align: center;
}

.dashboard-week-card .app-stat-value {
  font-size: 1.75rem;
}

.dashboard-upcoming {
  margin-bottom: 0;
}

/* --- Bar Chart (in app) --- */
.app-bar-chart {
  height: 200px;
}

/* --- Upcoming Sessions --- */
.app-upcoming {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.app-upcoming-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
  transition: all var(--transition);
}

.app-upcoming-item:hover {
  border-color: var(--primary-light);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.app-upcoming-time {
  display: flex;
  flex-direction: column;
  min-width: 80px;
}

.app-upcoming-time strong {
  font-size: 0.875rem;
  color: var(--gray-900);
}

.app-upcoming-time span {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.app-upcoming-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.app-upcoming-type {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
}

.app-upcoming-goal {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.app-upcoming-partner {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.mini-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.partner-count {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Goals (reuse from main) --- */
.app-goals {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* --- Partners --- */
.app-partners {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.app-partner-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 14px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  transition: all var(--transition);
  gap: 6px;
}

.app-partner-card:hover {
  border-color: var(--primary-light);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.partner-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 4px;
  border: 2px solid var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.app-partner-card strong {
  font-size: 0.875rem;
  color: var(--gray-900);
}

.app-partner-card span {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.partner-tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 0.875rem !important;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-top: 4px;
}

/* ============================================
   Profile Page
   ============================================ */
.profile-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-card-main {
  position: relative;
  overflow: hidden;
  text-align: center;
  border-color: rgba(99, 102, 241, 0.13);
  background:
    radial-gradient(circle at 50% -20%, rgba(99,102,241,0.12), transparent 42%),
    var(--white);
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.profile-avatar-wrapper {
  position: relative;
  display: inline-block;
}

.profile-avatar-button {
  padding: 0;
  overflow: hidden;
  border: 3px solid var(--white);
  box-shadow:
    0 0 0 1px rgba(99,102,241,0.18),
    0 10px 28px rgba(79,70,229,0.16);
  cursor: pointer;
  transition: box-shadow var(--transition), transform var(--transition);
}

.profile-avatar-button:hover {
  box-shadow:
    0 0 0 3px rgba(99,102,241,0.14),
    0 14px 34px rgba(79,70,229,0.20);
  transform: translateY(-2px);
}

.profile-avatar-lg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.profile-avatar-edit {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  border: 2px solid var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  pointer-events: none;
}

.profile-avatar-edit:hover {
  background: var(--primary-dark);
}

.profile-avatar-copy {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  margin-top: -8px;
}

.profile-avatar-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.profile-avatar-change {
  padding: 0;
  border: 0;
  color: var(--primary);
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.profile-avatar-change:disabled {
  opacity: 0.55;
  cursor: wait;
}

.profile-avatar-remove {
  padding: 0;
  border: 0;
  color: var(--danger);
  background: transparent;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.profile-avatar-remove:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-avatar-remove:disabled {
  opacity: 0.55;
  cursor: wait;
}

.profile-avatar-copy span {
  color: var(--gray-400);
  font-size: 0.875rem;
}

.profile-avatar-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 24px;
}

.profile-avatar-modal[hidden] {
  display: none;
}

.profile-avatar-modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(15, 23, 42, 0.72);
  cursor: zoom-out;
  backdrop-filter: blur(6px);
}

.profile-avatar-modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, calc(100vw - 48px));
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 22px;
  background: var(--white);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.35);
}

.profile-avatar-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 2px 2px 14px 6px;
}

.profile-avatar-modal-header h2 {
  margin: 0;
  font-size: 1rem;
}

.profile-avatar-modal-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--gray-200);
  border-radius: 50%;
  color: var(--gray-700);
  background: var(--white);
  cursor: pointer;
}

.profile-avatar-modal-close:hover {
  color: var(--primary);
  border-color: rgba(99, 102, 241, 0.35);
  background: var(--primary-bg);
}

.profile-avatar-modal-close:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.22);
  outline-offset: 2px;
}

.profile-avatar-modal-card > img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  background: var(--gray-100);
  object-fit: cover;
}

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

.profile-avatar-crop-card {
  width: min(600px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  padding: 18px;
}

.profile-avatar-crop-card .profile-avatar-modal-header {
  align-items: flex-start;
}

.profile-avatar-crop-card .profile-section-kicker {
  display: block;
  margin-bottom: 3px;
}

.profile-avatar-crop-help {
  margin: -3px 6px 14px;
  color: var(--gray-500);
  font-size: 0.86rem;
  line-height: 1.45;
}

.profile-avatar-crop-stage {
  position: relative;
  width: min(100%, 460px);
  margin: 0 auto;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(45deg, #eef0f7 25%, transparent 25%),
    linear-gradient(-45deg, #eef0f7 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eef0f7 75%),
    linear-gradient(-45deg, transparent 75%, #eef0f7 75%),
    #f8fafc;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.profile-avatar-crop-stage.is-dragging {
  cursor: grabbing;
}

.profile-avatar-crop-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.profile-avatar-crop-mask {
  position: absolute;
  inset: 3px;
  border: 3px solid rgba(255, 255, 255, 0.98);
  border-radius: 50%;
  box-shadow:
    0 0 0 999px rgba(15, 23, 42, 0.55),
    0 0 0 1px rgba(15, 23, 42, 0.18),
    0 8px 28px rgba(15, 23, 42, 0.24);
  pointer-events: none;
}

.profile-avatar-crop-zoom {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: min(100%, 460px);
  margin: 16px auto 0;
  color: var(--gray-700);
  font-size: 0.86rem;
  font-weight: 750;
}

.profile-avatar-crop-zoom input {
  width: 100%;
  accent-color: var(--primary);
}

.profile-avatar-crop-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  width: min(100%, 460px);
  margin: 16px auto 0;
}

body.modal-open {
  overflow: hidden;
}

.profile-name-section h2 {
  font-size: 1.85rem;
  margin-bottom: 6px;
}

.profile-name-section {
  width: min(100%, 620px);
  padding: 18px 24px 16px;
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.05);
}

.profile-display-note {
  margin: -1px 0 8px;
  color: var(--gray-500);
  font-size: 0.875rem;
}

.profile-plan-badge {
  display: inline-block;
  padding: 3px 12px;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
}

.profile-plan-badge.is-pro {
  color: var(--white);
  background: var(--brand-gradient);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

#profileWeeklyUsage[hidden],
#profileWeeklyUpgrade[hidden],
#profilePremiumUpgrade[hidden] {
  display: none;
}

.profile-member-since {
  font-size: 0.88rem;
  color: var(--gray-500);
}

.profile-preferred-summary {
  margin-top: 12px;
}

.profile-preferred-summary > span {
  display: block;
  margin-bottom: 7px;
  color: var(--gray-400);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.profile-preferred-summary > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  max-width: 620px;
}

.profile-preferred-summary > div span {
  padding: 4px 9px;
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-full);
  color: var(--primary);
  background: var(--primary-bg);
  font-size: 0.875rem;
  font-weight: 600;
}

.profile-stats-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-100);
}

.profile-stat {
  text-align: center;
}

.profile-stat strong {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--gray-900);
}

.profile-stat span {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.profile-weekly-usage {
  display: grid;
  grid-template-columns: minmax(190px, 1.15fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 18px 20px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.9), rgba(255, 255, 255, 0.96));
}

.profile-weekly-usage-copy strong {
  display: block;
  margin-top: 3px;
  color: var(--gray-900);
}

.profile-weekly-usage-copy p,
.profile-premium-heading p,
.profile-premium-upgrade p {
  margin: 4px 0 0;
  color: var(--gray-500);
  font-size: 0.875rem;
  line-height: 1.5;
}

.profile-weekly-usage-meter {
  min-width: 0;
}

.profile-weekly-usage-track {
  height: 9px;
  margin-bottom: 7px;
  overflow: hidden;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.13);
}

.profile-weekly-usage-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transition: width 300ms ease;
}

.profile-weekly-usage-meter small {
  color: var(--gray-500);
  line-height: 1.35;
}

.profile-weekly-usage.is-pro {
  border-color: rgba(16, 185, 129, 0.28);
  background: linear-gradient(135deg, rgba(236, 253, 245, 0.92), rgba(255, 255, 255, 0.96));
}

.profile-weekly-usage.is-pro .profile-section-kicker {
  color: #059669;
}

.profile-weekly-usage.is-pro .profile-weekly-usage-track {
  background: rgba(16, 185, 129, 0.13);
}

.profile-weekly-usage.is-pro .profile-weekly-usage-track span {
  background: linear-gradient(90deg, #10b981, #34d399);
}

.profile-referral-card {
  position: relative;
  order: -1;
  overflow: visible;
  border-color: rgba(99, 102, 241, 0.24);
  background:
    radial-gradient(circle at 100% 0%, rgba(139, 92, 246, 0.14), transparent 34%),
    linear-gradient(135deg, rgba(238, 242, 255, 0.78), rgba(255, 255, 255, 0.98));
}

.profile-referral-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.profile-referral-heading h3 {
  margin: 4px 0 0;
  color: var(--gray-900);
}

.profile-referral-heading p {
  max-width: 680px;
  margin: 6px 0 0;
  color: var(--gray-500);
  font-size: 0.9rem;
  line-height: 1.5;
}

.profile-referral-kicker-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.profile-referral-help {
  position: relative;
  display: inline-flex;
}

.profile-referral-help button {
  display: inline-grid;
  width: 20px;
  height: 20px;
  padding: 0;
  place-items: center;
  color: var(--primary);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: help;
  border: 1px solid rgba(99, 102, 241, 0.32);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
}

.profile-referral-help [role="tooltip"] {
  position: absolute;
  z-index: 20;
  top: calc(100% + 9px);
  left: 50%;
  width: min(310px, calc(100vw - 48px));
  padding: 11px 13px;
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -4px);
  transition: opacity 150ms ease, transform 150ms ease;
  border-radius: 10px;
  background: #1e293b;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.24);
}

.profile-referral-help:hover [role="tooltip"],
.profile-referral-help:focus-within [role="tooltip"] {
  opacity: 1;
  transform: translate(-50%, 0);
}

.profile-referral-level {
  flex: 0 0 auto;
  padding: 7px 12px;
  color: #5b21b6;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: var(--radius-full);
  background: rgba(245, 243, 255, 0.88);
}

.profile-referral-link-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
}

.profile-referral-link-row input {
  min-width: 0;
  height: 40px;
  padding: 0 13px;
  color: var(--gray-700);
  font-size: 0.88rem;
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.88);
}

.profile-referral-status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.profile-referral-status > div {
  padding: 12px 14px;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.64);
}

.profile-referral-status strong {
  display: block;
  color: var(--gray-900);
  font-size: 1.2rem;
}

.profile-referral-status span {
  color: var(--gray-500);
  font-size: 0.78rem;
}

.profile-referral-progress {
  margin-top: 15px;
}

.profile-referral-progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 7px;
  color: var(--gray-600);
  font-size: 0.8rem;
}

.profile-referral-progress-copy strong {
  color: var(--gray-800);
}

.profile-referral-progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.13);
}

.profile-referral-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transition: width 300ms ease;
}

.profile-premium-insights {
  --profile-premium-frame: linear-gradient(
    180deg,
    #6366f1 0%,
    #6366f1 34%,
    #7470f4 58%,
    #8b5cf6 76%,
    #8b5cf6 100%
  );
  position: relative;
  margin-top: 30px;
  padding: 30px 28px 26px;
  border: 2px solid transparent;
  background:
    radial-gradient(circle at 100% 0%, rgba(139, 92, 246, 0.13), transparent 34%) padding-box,
    linear-gradient(145deg, #ffffff, #f8f8ff) padding-box,
    var(--profile-premium-frame) border-box;
  box-shadow: 0 14px 34px rgba(79, 70, 229, 0.1);
}

.profile-premium-badge {
  position: absolute;
  top: 0;
  left: 50%;
  padding: 6px 15px;
  transform: translate(-50%, -50%);
  border: 3px solid var(--white);
  border-radius: var(--radius-full);
  color: var(--white);
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 6px 14px rgba(99, 102, 241, 0.28);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.profile-premium-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  margin-bottom: 20px;
}

.profile-premium-heading h3 {
  margin: 3px 0 0;
}

.profile-premium-heading > p {
  max-width: none;
  text-align: right;
}

.profile-premium-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.profile-premium-stat {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 18px 14px;
  text-align: center;
  border: 1px solid rgba(99, 102, 241, 0.24);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.055);
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.profile-premium-stat::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #7480ff);
  opacity: 0.78;
}

.profile-premium-stat:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.42);
  box-shadow: 0 12px 26px rgba(79, 70, 229, 0.1);
}

.profile-premium-stat strong {
  display: block;
  color: var(--gray-900);
  font-size: 1.25rem;
  font-weight: 800;
}

.profile-premium-stat span {
  color: var(--gray-500);
  font-size: 0.875rem;
}

.profile-premium-subheading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 26px 0 12px;
  padding-top: 22px;
  border-top: 1px solid rgba(99, 102, 241, 0.15);
}

.profile-premium-subheading h4 {
  margin: 3px 0 0;
  color: var(--gray-900);
  font-size: 1.05rem;
}

.profile-premium-subheading .profile-section-kicker {
  color: #8b5cf6;
}

.profile-premium-subheading p {
  max-width: 520px;
  margin: 0;
  color: var(--gray-500);
  font-size: 0.82rem;
  line-height: 1.45;
  text-align: right;
}

.profile-task-stats .profile-premium-stat {
  background: rgba(255, 255, 255, 0.92);
}

.profile-task-stats .profile-premium-stat::before {
  background: linear-gradient(90deg, #8b5cf6, #a855f7);
}

.profile-premium-content {
  transition: filter 180ms ease, opacity 180ms ease;
}

.profile-premium-insights:not(.is-unlocked) .profile-premium-content {
  filter: blur(4px);
  opacity: 0.42;
  pointer-events: none;
  user-select: none;
}

.profile-premium-insights:not(.is-unlocked) .profile-premium-stat {
  box-shadow: none;
}

.profile-premium-insights:not(.is-unlocked) .profile-premium-stat strong,
.profile-premium-insights:not(.is-unlocked) .profile-premium-stat span {
  color: var(--gray-400);
}

.profile-premium-upgrade {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.08);
}

.profile-premium-upgrade strong {
  color: var(--gray-900);
}

.profile-premium-upgrade .btn {
  flex: 0 0 auto;
}

.profile-premium-insights.is-unlocked {
  box-shadow: 0 14px 34px rgba(79, 70, 229, 0.1);
}

.profile-premium-insights.is-unlocked .profile-premium-badge {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  box-shadow: 0 6px 14px rgba(99, 102, 241, 0.28);
}

/* Profile Form */
.profile-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 18px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--gray-100);
}

.profile-section-heading h3 {
  margin: 3px 0 0;
}

.profile-section-heading > p {
  max-width: 560px;
  color: var(--gray-500);
  font-size: 0.875rem;
  line-height: 1.55;
}

.profile-section-kicker {
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-hint {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-400);
  margin-top: 4px;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-tag {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--gray-100);
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.profile-tag:hover {
  border-color: var(--primary-light);
}

.profile-tag.active {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--primary-light);
}

.profile-tag:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.18);
  outline-offset: 2px;
}

/* Calendar connections */
.calendar-integration-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.08), transparent 30%),
    var(--white);
}

.calendar-provider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.calendar-integration-error {
  margin: 0 0 14px;
  padding: 11px 13px;
  border: 1px solid rgba(239, 68, 68, 0.22);
  border-radius: 10px;
  color: #b91c1c;
  background: rgba(254, 242, 242, 0.8);
  font-size: 0.875rem;
}

.calendar-provider-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 18px;
  border: 1px solid var(--gray-100);
  border-radius: 16px;
  background: var(--gray-50);
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.calendar-provider-card[hidden] {
  display: none;
}

.calendar-provider-card.is-connected {
  border-color: rgba(99, 102, 241, 0.34);
  background: linear-gradient(145deg, rgba(238, 242, 255, 0.82), rgba(245, 243, 255, 0.72));
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.08);
}

.calendar-provider-card.is-unavailable {
  opacity: 0.72;
}

.calendar-provider-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 850;
}

.calendar-provider-google {
  background: var(--white);
  border: 1px solid var(--gray-100);
}

.calendar-provider-google img {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.calendar-provider-microsoft {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.calendar-provider-feed {
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.18);
  background: var(--primary-bg);
}

.calendar-provider-copy {
  min-width: 0;
}

.calendar-provider-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 5px;
}

.calendar-provider-heading strong {
  color: var(--gray-900);
  font-size: 0.96rem;
}

.calendar-provider-heading span {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--gray-500);
  background: var(--white);
  font-size: 0.875rem;
  font-weight: 700;
}

.calendar-provider-card.is-connected .calendar-provider-heading span {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.82);
}

.calendar-provider-copy p,
.calendar-sync-footer p {
  margin: 0;
  color: var(--gray-500);
  font-size: 0.875rem;
  line-height: 1.5;
}

.calendar-feed-card {
  grid-column: 1 / -1;
  align-items: flex-start;
}

.calendar-feed-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.calendar-feed-controls input {
  min-width: 0;
  flex: 1;
  padding: 9px 11px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  color: var(--gray-600);
  background: var(--white);
  font: inherit;
  font-size: 0.875rem;
}

.calendar-feed-renew {
  padding: 7px 3px;
  border: 0;
  color: var(--gray-500);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.calendar-provider-copy small {
  display: block;
  margin-top: 8px;
  color: var(--gray-400);
  font-size: 0.875rem;
  line-height: 1.45;
}

.calendar-sync-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}

.calendar-sync-footer strong {
  display: block;
  margin-bottom: 2px;
  color: var(--gray-900);
  font-size: 0.9rem;
}

[data-theme="dark"] .calendar-integration-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.12), transparent 30%),
    #121827;
}

[data-theme="dark"] .calendar-provider-card {
  border-color: #293144;
  background: #171d2b;
}

[data-theme="dark"] .calendar-provider-card.is-connected {
  border-color: rgba(129, 140, 248, 0.44);
  background: linear-gradient(145deg, rgba(49, 46, 129, 0.26), rgba(76, 29, 149, 0.2));
}

[data-theme="dark"] .calendar-provider-google {
  border-color: #30394d;
  background: #f8fafc;
}

[data-theme="dark"] .calendar-provider-heading strong,
[data-theme="dark"] .calendar-sync-footer strong {
  color: #f8fafc;
}

[data-theme="dark"] .calendar-provider-heading span,
[data-theme="dark"] .calendar-feed-controls input {
  color: #a8b1c3;
  border-color: #30394d;
  background: #0f1420;
}

[data-theme="dark"] .calendar-sync-footer {
  border-color: #293144;
}

/* Settings */
.settings-list {
  display: flex;
  flex-direction: column;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-100);
}

.billing-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.billing-purchase-legal {
  flex-basis: 100%;
  color: var(--gray-500);
  font-size: 0.75rem;
  line-height: 1.45;
  text-align: right;
}

.billing-purchase-legal a {
  color: var(--primary-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 640px) {
  .billing-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .billing-purchase-legal {
    text-align: left;
  }

  .calendar-provider-grid {
    grid-template-columns: 1fr;
  }

  .calendar-feed-card {
    grid-column: auto;
  }

  .calendar-provider-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .calendar-provider-card > .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .calendar-feed-controls,
  .calendar-sync-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-feed-controls .btn,
  .calendar-sync-footer .btn {
    width: 100%;
  }
}

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

.settings-item strong {
  display: block;
  font-size: 0.9rem;
  color: var(--gray-900);
  margin-bottom: 2px;
}

.settings-item p {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.settings-danger strong {
  color: var(--danger);
}

.btn-danger-outline {
  background: transparent;
  color: var(--danger);
  border: 2px solid var(--danger);
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-danger-outline:hover {
  background: var(--danger);
  color: var(--white);
}

/* Toggle inline */
.toggle-inline {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  cursor: pointer;
}

.notification-setting-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toggle-inline input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-inline-slider {
  position: absolute;
  inset: 0;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  transition: all var(--transition);
}

.toggle-inline-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--white);
  border-radius: 50%;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.toggle-inline input:checked + .toggle-inline-slider {
  background: var(--primary);
}

.toggle-inline input:checked + .toggle-inline-slider::before {
  transform: translateX(20px);
}

/* ============================================
   Calendar App Layout
   ============================================ */
.calendar-app-wrapper {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
}

.cal-app-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cal-app-main {
  min-width: 0;
}

/* Booking Partner Preview */
.booking-partner-preview {
  margin-bottom: 20px;
}

.booking-partner-preview h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 10px;
}

.booking-partners {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.booking-partner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
}

.booking-partner strong {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-900);
}

.booking-partner span {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .profile-stats-row { grid-template-columns: repeat(2, 1fr); }
  .profile-weekly-usage { grid-template-columns: 1fr 1fr; }
  .profile-weekly-usage .btn { justify-self: start; }
  .profile-premium-stats { grid-template-columns: repeat(2, 1fr); }
  .app-stats-row { grid-template-columns: repeat(2, 1fr); }
  .app-grid-2 { grid-template-columns: 1fr; }
  .app-partners { grid-template-columns: repeat(2, 1fr); }
  .calendar-app-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .app-sidebar {
    display: none;
  }
  .app-main {
    margin-left: 0;
    padding: 20px 16px;
  }
  .app-stats-row { grid-template-columns: 1fr 1fr; }
  .app-partners { grid-template-columns: 1fr 1fr; }
  .app-header { flex-direction: column; gap: 12px; align-items: flex-start; }
  .profile-stats-row { grid-template-columns: 1fr 1fr; }
  .profile-weekly-usage { grid-template-columns: 1fr; gap: 15px; }
  .profile-referral-heading { gap: 16px; }
  .profile-premium-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .profile-premium-heading > p { max-width: none; text-align: left; }
  .profile-premium-subheading { align-items: flex-start; flex-direction: column; gap: 6px; }
  .profile-premium-subheading p { max-width: none; text-align: left; }
  .profile-premium-upgrade { align-items: flex-start; flex-direction: column; }
  .profile-premium-upgrade .btn { width: 100%; }
}

@media (max-width: 560px) {
  .profile-premium-insights { padding: 30px 18px 18px; }
  .profile-premium-stats { grid-template-columns: 1fr 1fr; }
  .profile-weekly-usage .btn { width: 100%; }
  .profile-referral-heading { flex-direction: column; }
  .profile-referral-link-row { grid-template-columns: 1fr 1fr; }
  .profile-referral-link-row input { grid-column: 1 / -1; }
  .profile-referral-status { grid-template-columns: 1fr; }
  .settings-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .notification-setting-actions {
    width: 100%;
    justify-content: space-between;
  }
}

/* SchaffZeit-Startwoche: shared authenticated-page notice */
.founder-campaign-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 24px;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--primary) 26%, transparent);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 95% 0%, rgba(109, 93, 252, 0.14), transparent 45%),
    var(--white);
  box-shadow: var(--shadow-sm);
}

.founder-campaign-banner-copy {
  display: grid;
  gap: 4px;
}

.founder-campaign-banner-kicker {
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.founder-campaign-banner-copy strong {
  color: var(--gray-900);
  font-size: 1.04rem;
}

.founder-campaign-banner-copy p {
  max-width: 760px;
  margin: 0;
  color: var(--gray-600);
  font-size: 0.88rem;
  line-height: 1.5;
}

.founder-campaign-banner-copy > span:last-child:not(.founder-campaign-banner-kicker) {
  margin-top: 4px;
  color: var(--gray-900);
  font-size: 0.8rem;
  font-weight: 700;
}

.founder-campaign-banner-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
}

.founder-campaign-banner.is-compact {
  gap: 18px;
  margin-bottom: 16px;
  padding: 11px 14px;
  border-radius: 14px;
}

.founder-campaign-banner.is-compact .founder-campaign-banner-copy {
  display: flex;
  min-width: 0;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px 10px;
}

.founder-campaign-banner.is-compact .founder-campaign-banner-kicker {
  width: 100%;
  font-size: 0.65rem;
}

.founder-campaign-banner.is-compact .founder-campaign-banner-copy strong {
  font-size: 0.92rem;
}

.founder-campaign-banner.is-compact .founder-campaign-banner-copy p {
  font-size: 0.8rem;
}

.founder-campaign-banner.is-compact .founder-campaign-banner-copy > span:last-child:not(.founder-campaign-banner-kicker) {
  margin-top: 0;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .founder-campaign-banner {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .founder-campaign-banner-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .founder-campaign-banner .btn {
    justify-content: center;
    width: 100%;
  }

  .founder-campaign-banner.is-compact .founder-campaign-banner-copy {
    display: grid;
    gap: 4px;
  }

  .founder-campaign-banner.is-compact .founder-campaign-banner-copy > span:last-child:not(.founder-campaign-banner-kicker) {
    white-space: normal;
  }
}

/* ============================================
   Realtime Task List
   ============================================ */
.task-card {
  position: relative;
}

.task-visibility-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gray-500);
  font-size: 0.875rem;
}

.task-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.task-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--white);
  transition: border-color 0.2s;
}

.task-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.task-add-btn {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: grab;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, opacity 0.15s, transform 0.15s;
}

.task-item:hover {
  background: var(--gray-50);
}

.task-item.dragging {
  border-color: rgba(99,102,241,0.35);
  background: var(--white);
  box-shadow: 0 12px 28px rgba(79,70,229,0.18);
  cursor: grabbing;
  opacity: 0.72;
  transform: scale(1.01);
}

.task-item:focus-visible {
  border-color: var(--primary);
  outline: 3px solid rgba(99, 102, 241, 0.18);
  outline-offset: 1px;
}

.task-item.task-completed .task-text {
  text-decoration: line-through;
  color: var(--gray-400);
}

.task-item.task-completed {
  opacity: 0.68;
}

.task-item.task-completed:hover {
  opacity: 0.82;
}

.task-check {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
}

.task-check:hover {
  border-color: var(--primary);
}

.task-check.checked {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.task-text {
  flex: 1;
  min-width: 0;
  font-size: 0.9rem;
  color: var(--gray-800);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.task-edit,
.task-edit-save,
.task-edit-cancel,
.task-visibility,
.task-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-300);
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.15s;
}

.task-edit-save,
.task-edit-cancel {
  opacity: 1;
}

.task-edit {
  opacity: 1;
  color: var(--gray-400);
}

.task-edit-save {
  color: var(--success);
}

.task-edit-cancel {
  color: var(--gray-400);
}

.task-edit:hover,
.task-edit-save:hover,
.task-edit-cancel:hover {
  color: var(--primary);
  background: var(--primary-bg);
}

.task-edit-input {
  flex: 1;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid var(--primary);
  border-radius: var(--radius-sm);
  color: var(--gray-800);
  background: var(--white);
  font: inherit;
  line-height: 1.3;
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.task-visibility {
  opacity: 1;
  color: var(--gray-400);
}

.task-visibility:hover {
  color: var(--primary);
  background: var(--primary-bg);
}

.task-visibility.shared {
  color: var(--white);
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.task-visibility:focus-visible,
.task-edit:focus-visible,
.task-edit-save:focus-visible,
.task-edit-cancel:focus-visible,
.task-delete:focus-visible,
.task-check:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.18);
  outline-offset: 2px;
}

.task-item:hover .task-edit,
.task-item:hover .task-delete {
  opacity: 1;
}

.task-delete:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.08);
}

@media (hover: none) {
  .task-edit,
  .task-delete {
    opacity: 1;
  }
}

.task-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0 4px;
  margin-top: 4px;
}

.task-divider span {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.task-empty {
  padding: 24px 0;
  text-align: center;
}

.task-empty p {
  font-size: 0.875rem;
  color: var(--gray-400);
}

.task-counter {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-400);
  margin-left: 6px;
}

/* ============================================
   Sidebar Avatar Placeholder
   ============================================ */
.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  overflow: hidden;
}

.sidebar-user-avatar .sidebar-user-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   Profile Avatar Placeholder
   ============================================ */
.profile-avatar-placeholder {
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ============================================
   Empty States
   ============================================ */
.empty-state {
  padding: 32px 16px;
  text-align: center;
  color: var(--gray-400);
}

.empty-state p {
  font-size: 0.9rem;
  margin-bottom: 12px;
}

/* ============================================
   Week Calendar
   ============================================ */
.quick-join-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 9px 8px 13px;
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.52);
}

.quick-join-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.quick-join-copy strong {
  color: var(--gray-900);
  font-size: 0.82rem;
}

.quick-join-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.wk-card {
  padding: 0;
  overflow: hidden;
  border-color: rgba(99, 102, 241, 0.1);
  border-radius: 24px;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.1);
}

.wk-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--white);
}

.wk-date-navigation {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wk-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  min-width: 260px;
  text-align: center;
}

.wk-view-picker {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-full);
  background: var(--gray-50);
}

.wk-view-picker button {
  padding: 7px 13px;
  border: 0;
  border-radius: var(--radius-full);
  color: var(--gray-500);
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 650;
  cursor: pointer;
}

.wk-view-picker button.active {
  color: var(--white);
  background: var(--brand-gradient);
  box-shadow: 0 5px 14px rgba(79,70,229,0.20);
}

.wk-duration-panel {
  display: grid;
  grid-template-columns: minmax(210px, 0.65fr) minmax(390px, 1.15fr) minmax(230px, 0.7fr);
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(99,102,241,0.12);
  background: linear-gradient(135deg, rgba(238,242,255,0.72), rgba(250,245,255,0.76));
}

.wk-duration-intro {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wk-duration-intro > span {
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.wk-duration-intro strong {
  color: var(--gray-900);
  font-size: 0.92rem;
}

.wk-duration-intro p {
  max-width: 390px;
  color: var(--gray-500);
  font-size: 0.875rem;
  line-height: 1.45;
}

.day-impulse-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 13px 14px 13px 16px;
  border: 1px solid rgba(99,102,241,0.24);
  border-radius: 16px;
  background: rgba(255,255,255,0.82);
  box-shadow: 0 8px 20px rgba(79,70,229,0.07);
}

.day-impulse-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.day-impulse-copy > span {
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 800;
}

.day-impulse-copy strong {
  color: var(--gray-900);
  font-size: 0.96rem;
}

.day-impulse-copy p {
  margin: 0;
  color: var(--gray-600);
  font-size: 0.875rem;
  line-height: 1.4;
}

.day-impulse-info {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid rgba(99,102,241,0.28);
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-bg);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
}

.day-impulse-info:hover,
.day-impulse-info:focus-visible {
  color: var(--white);
  background: var(--primary);
  outline: none;
}

.day-impulse-popover {
  position: absolute;
  z-index: 2200;
  top: calc(100% + 10px);
  right: 0;
  width: min(390px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  color: var(--gray-700);
  background: var(--white);
  box-shadow: 0 20px 48px rgba(15,23,42,0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.day-impulse-card:hover .day-impulse-popover,
.day-impulse-card:focus-within .day-impulse-popover,
.day-impulse-card.open .day-impulse-popover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.day-impulse-popover > strong {
  display: block;
  color: var(--gray-900);
  font-size: 1rem;
}

.day-impulse-popover > p {
  margin: 4px 0 13px;
  color: var(--gray-600);
  font-size: 0.875rem;
  line-height: 1.5;
}

.day-impulse-popover ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.day-impulse-popover li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 7px 8px;
  border-radius: 9px;
  font-size: 0.875rem;
}

.day-impulse-popover li:nth-child(odd) {
  background: var(--gray-50);
}

.day-impulse-popover li b {
  color: var(--gray-900);
}

@media (max-width: 1180px) {
  .wk-duration-panel {
    grid-template-columns: minmax(190px, 0.65fr) minmax(380px, 1.35fr);
  }

  .day-impulse-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .day-impulse-card {
    grid-column: auto;
  }

  .day-impulse-popover {
    right: auto;
    left: 0;
  }
}

.wk-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: clamp(660px, calc(100dvh - 80px), 1040px);
}

.wk-grid {
  display: grid;
  min-width: 100%;
}

.wk-cell {
  border-right: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
}

.wk-cell.wk-slot-full,
.wk-cell.wk-full-hour,
.wk-cell.wk-slot-quarter,
.wk-cell.wk-quarter-hour {
  min-height: 52px;
}

/* Corner cell */
.wk-corner {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 2;
}

/* Day headers */
.wk-day-header {
  flex-direction: column;
  gap: 2px;
  padding: 14px 6px;
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 2px solid var(--gray-200);
}

.wk-day-header.wk-past {
  background: #f5f7fa;
}

.wk-day-header.wk-today {
  background: linear-gradient(180deg, rgba(238,242,255,0.92), rgba(255,255,255,0.98));
  box-shadow:
    inset 1px 0 rgba(99,102,241,0.14),
    inset -1px 0 rgba(99,102,241,0.14);
}

.wk-day-name {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--gray-500);
  letter-spacing: 0.5px;
}

.wk-day-num {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-700);
}

.wk-today-num {
  background: var(--primary);
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wk-past .wk-day-name,
.wk-past .wk-day-num {
  color: var(--gray-300);
}

/* Time labels */
.wk-time-label {
  font-size: 0.875rem;
  color: var(--gray-500);
  font-weight: 500;
  padding: 2px 10px 0;
  background: rgba(249, 250, 251, 0.92);
  justify-content: flex-end;
  align-items: flex-start;
  position: sticky;
  left: 0;
  z-index: 1;
}

.wk-full-hour {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gray-800);
}

.wk-quarter-hour {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-500);
}

/* Slot cells */
.wk-slot {
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}

/* Available slot hover */
.wk-slot-avail {
  position: relative;
  z-index: 4;
  font-size: 0.875rem;
  color: transparent;
  transition: all 0.15s;
}

.wk-slot:hover:not(.wk-past-slot):not(.wk-booked):not(.wk-occupied):not(.wk-too-soon):not(.wk-open-session)::before {
  position: absolute;
  top: 1px;
  right: 2px;
  left: 2px;
  z-index: 3;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  background: rgba(238, 242, 255, 0.92);
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.12);
  pointer-events: none;
  content: "";
}

.wk-grid[data-duration="30"] .wk-slot:hover:not(.wk-past-slot):not(.wk-booked):not(.wk-occupied):not(.wk-too-soon):not(.wk-open-session)::before {
  height: calc(100% - 2px);
}

.wk-grid[data-duration="60"] .wk-slot:hover:not(.wk-past-slot):not(.wk-booked):not(.wk-occupied):not(.wk-too-soon):not(.wk-open-session)::before {
  height: calc(200% - 2px);
}

.wk-slot:hover:not(.wk-past-slot):not(.wk-booked):not(.wk-occupied):not(.wk-too-soon):not(.wk-open-session) .wk-slot-avail {
  color: var(--primary);
  font-weight: 700;
}

.wk-today-col {
  background: rgba(99, 102, 241, 0.035);
  box-shadow:
    inset 1px 0 rgba(99,102,241,0.10),
    inset -1px 0 rgba(99,102,241,0.10);
}

.wk-past-slot {
  cursor: default;
  background: rgba(226, 232, 240, 0.46);
  border-bottom-color: rgba(203, 213, 225, 0.48);
  box-shadow: none;
}

/* Past slots in today's column should still be clearly "past" */
.wk-today-col.wk-past-slot {
  background: rgba(226, 232, 240, 0.54);
  box-shadow:
    inset 1px 0 rgba(148,163,184,0.18),
    inset -1px 0 rgba(148,163,184,0.18);
}

/* Occupied cell (covered by the 60-minute session above) */
.wk-occupied {
  pointer-events: none;
  background: transparent;
}

/* Booked slots – shared */
.wk-booked {
  position: relative;
  overflow: visible;
  z-index: 2;
  padding: 0;
  cursor: default;
}

.wk-booked-card {
  position: absolute;
  top: 1px;
  left: 2px;
  right: 2px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 10px;
  padding: 5px 8px 5px 11px;
  border-radius: 5px;
  overflow: hidden;
}

.wk-booked-identity,
.wk-booked-meta {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.wk-booked-identity {
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
}

.wk-booked-meta {
  align-items: flex-end;
  justify-content: space-between;
  gap: 3px;
  text-align: right;
}

/* Compact: 30 minutes = one half-hour row. */
.wk-booked-short .wk-booked-card {
  height: calc(100% - 2px);
  padding: 3px 7px 3px 9px;
  gap: 8px;
  border-left: 3px solid var(--primary);
  background: #eef2ff;
}

.wk-booked-short .wk-booked-identity {
  gap: 1px;
}

.wk-booked-short .wk-booked-type {
  font-size: 0.74rem;
}

.wk-booked-short .wk-booked-duration {
  padding: 0 4px;
  font-size: 0.7rem;
}

.wk-booked-short .wk-booked-status,
.wk-booked-short .wk-booked-action,
.wk-booked-short .wk-partner-name {
  font-size: 0.78rem;
}

.wk-booked-short .wk-partner-avatar {
  width: 28px;
  height: 28px;
  min-width: 28px;
}

.wk-booked-short.wk-has-partner .wk-booked-duration {
  margin-left: 34px;
}

.wk-booked-short .wk-cancel-btn {
  width: 18px;
  height: 18px;
  font-size: 0.88rem;
}

.wk-booked-short .wk-booked-action.is-ready {
  align-self: flex-end;
  margin-bottom: 0;
  padding: 1px 4px;
  box-shadow: none;
}

/* Deep: 60 minutes = two half-hour rows. */
.wk-booked-long .wk-booked-card {
  height: calc(200% - 2px);
  padding: 8px 12px 8px 14px;
  gap: 16px;
  border-left: 3px solid #8b5cf6;
  background: linear-gradient(135deg, #f3e8ff, #ede9fe);
}

.wk-booked-long .wk-booked-type {
  color: #6d28d9;
  font-size: 0.86rem;
}

.wk-booked-long .wk-booked-partner {
  gap: 9px;
}

.wk-booked-long .wk-partner-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
}

.wk-booked-long .wk-partner-name {
  font-size: 1rem;
}

.wk-booked-long.wk-has-partner .wk-booked-duration {
  margin-left: 51px;
  font-size: 0.8rem;
}

.wk-booked-long .wk-booked-action {
  font-size: 0.86rem;
}

.wk-booked-long .wk-cancel-btn {
  top: 5px;
  right: 6px;
  width: 22px;
  height: 22px;
  font-size: 1rem;
}

.wk-booked-card.wk-has-cancel .wk-booked-type {
  margin-right: 28px;
}

.wk-unmatched .wk-booked-card {
  border-left-color: #7c3aed;
  background: linear-gradient(135deg, #f5f3ff, #eef2ff);
}

.wk-unmatched .wk-booked-type {
  color: #5b21b6;
}

/* Slot starts too soon to book (lead-time buffer) */
.wk-too-soon {
  cursor: not-allowed;
  background: rgba(148, 163, 184, 0.10);
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.14);
}

.wk-booked-type {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.wk-booked-duration {
  flex: 0 0 auto;
  padding: 2px 5px;
  border-radius: var(--radius-full);
  color: var(--gray-600);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.2;
}

.wk-booked-status {
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  color: #5b54c7;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wk-booked-action {
  max-width: 100%;
  overflow: hidden;
  color: var(--gray-500);
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wk-booked-action.is-ready {
  align-self: flex-start;
  margin-bottom: 5px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  color: var(--white);
  background: var(--brand-gradient);
  box-shadow: 0 4px 10px rgba(79,70,229,0.22);
}

.wk-booked-meta .wk-booked-action.is-ready {
  align-self: flex-end;
  margin-bottom: 0;
}

.wk-booked-partner {
  display: flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-items: center;
  gap: 4px;
}

.wk-partner-name {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wk-partner-avatar {
  position: relative;
  overflow: hidden;
  width: 16px;
  height: 16px;
  min-width: 16px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.wk-partner-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.wk-open-session {
  z-index: 2;
  padding: 2px;
  cursor: pointer;
}

.wk-open-session-card {
  display: flex;
  width: 100%;
  min-width: 0;
  height: 100%;
  min-height: 46px;
  padding: 5px 8px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(124, 58, 237, 0.24);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(245, 243, 255, 0.98), rgba(238, 242, 255, 0.98));
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.08);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.wk-open-session:hover .wk-open-session-card,
.wk-open-session:focus-visible .wk-open-session-card {
  border-color: rgba(99, 102, 241, 0.58);
  box-shadow: 0 7px 16px rgba(79, 70, 229, 0.17);
  transform: translateY(-1px);
}

.wk-open-session:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.24);
  outline-offset: -3px;
}

.wk-open-session.is-booking {
  pointer-events: none;
  opacity: 0.62;
}

.wk-open-session-avatar {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  min-width: 34px;
  overflow: hidden;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  color: #5b21b6;
  background: linear-gradient(135deg, #ddd6fe, #e0e7ff);
  box-shadow: 0 2px 7px rgba(76, 29, 149, 0.14);
  font-size: 0.78rem;
  font-weight: 850;
}

.wk-open-session-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wk-open-session-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  line-height: 1.05;
}

.wk-open-session-copy strong,
.wk-open-session-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wk-open-session-copy strong {
  color: var(--gray-900);
  font-size: 0.84rem;
  font-weight: 800;
}

.wk-open-session-copy small {
  margin-top: 3px;
  color: #6d5bc6;
  font-size: 0.7rem;
  font-weight: 700;
}

.wk-open-session-copy small::before {
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 4px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.12);
  content: "";
  vertical-align: 1px;
}

.wk-open-session-action {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}

.wk-partner-name {
  overflow: hidden;
  color: var(--gray-700);
  font-size: 0.72rem;
  font-weight: 750;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wk-partner-waiting {
  font-size: 0.875rem;
  color: var(--gray-500);
  font-style: italic;
}

.wk-cancel-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 2;
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  cursor: pointer;
  font-size: 0.78rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.wk-cancel-btn:hover {
  background: rgba(239, 68, 68, 0.9);
}

/* Session duration picker */
.wk-session-type-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wk-type-btn {
  cursor: pointer;
  display: block;
  opacity: 0.62;
  transform: scale(0.985);
  transition: opacity var(--transition), transform var(--transition);
}

.wk-type-btn:hover {
  opacity: 0.84;
}

.wk-type-btn input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.wk-type-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 72px;
  padding: 12px 14px 12px 16px;
  border: 1px solid rgba(99,102,241,0.12);
  border-radius: 16px;
  color: var(--gray-700);
  background: rgba(243,244,246,0.76);
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    transform var(--transition),
    background-color var(--transition);
}

.wk-type-btn:hover .wk-type-content {
  border-color: rgba(99,102,241,0.30);
  transform: translateY(-1px);
}

.wk-type-btn.active {
  z-index: 1;
  opacity: 1;
  transform: scale(1);
}

.wk-type-btn.active .wk-type-content {
  border: 2px solid rgba(99,102,241,0.72);
  color: var(--gray-900);
  background: linear-gradient(135deg, var(--white), rgba(238,242,255,0.94));
  box-shadow: 0 10px 26px rgba(79,70,229,0.18);
}

.wk-type-btn.active .wk-type-content::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-gradient);
  box-shadow: 0 0 0 4px rgba(99,102,241,0.11);
  content: "";
}

.wk-type-btn.active .wk-type-content::after {
  position: absolute;
  top: -16px;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 9px;
  border: 2px solid var(--white);
  border-radius: var(--radius-full);
  color: var(--white);
  background: var(--brand-gradient);
  box-shadow: 0 5px 12px rgba(79,70,229,0.2);
  content: "✓ Ausgewählt";
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.wk-type-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.wk-type-copy strong {
  font-size: 0.88rem;
}

.wk-type-copy small {
  color: var(--gray-500);
  font-size: 0.875rem;
  line-height: 1.3;
}

.wk-type-duration {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  min-width: 54px;
  color: var(--gray-400);
  transition: color var(--transition), transform var(--transition);
}

.wk-type-btn.active .wk-type-duration {
  color: var(--primary);
  transform: scale(1.06);
}

.wk-type-duration strong {
  font-size: 1.55rem;
  line-height: 1;
}

.wk-type-duration small {
  margin-top: 2px;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .quick-join-card {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .quick-join-button {
    width: 100%;
  }

  .wk-header,
  .wk-duration-panel {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }
  .wk-date-navigation {
    justify-content: space-between;
  }
  .wk-view-picker {
    justify-content: center;
  }
  .wk-session-type-picker {
    grid-template-columns: 1fr;
  }
  .wk-header h3 {
    min-width: auto;
    font-size: 0.875rem;
  }
}

/* ============================================
   Session Reminder Banner
   ============================================ */
.session-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--primary);
  color: white;
  padding: 12px 20px;
  display: flex;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  animation: bannerSlideIn 0.4s ease;
}

@keyframes bannerSlideIn {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.session-banner-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 800px;
  width: 100%;
}

.session-banner-icon {
  font-size: 1.4rem;
}

.session-banner-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.session-banner-text strong {
  font-size: 0.92rem;
}

.session-banner-text span {
  font-size: 0.875rem;
  opacity: 0.85;
}

.session-banner .btn {
  white-space: nowrap;
  background: white;
  color: var(--primary);
  border: none;
  font-weight: 600;
}

.session-banner .btn:hover {
  background: var(--gray-100);
}

.session-banner-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.session-banner-close:hover {
  opacity: 1;
}

/* ============================================
   Focus Mode / Daily Video
   ============================================ */
.focus-mode-overlay {
  padding: 4px;
  background:
    radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.10), transparent 38%),
    linear-gradient(180deg, #f8f9ff 0%, #f3f2ff 100%);
  backdrop-filter: none;
}

.focus-mode-overlay::before {
  display: none;
}

.focus-mode-shell {
  position: relative;
  z-index: 1;
  width: min(1780px, 100%);
  height: min(1160px, calc(100vh - 8px));
  min-height: 620px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 72px rgba(79, 70, 229, 0.14);
  animation: focusModeIn 0.35s ease;
  overflow-x: hidden;
  overflow-y: auto;
}

@keyframes focusModeIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.focus-mode-shell.is-complete {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 18%, rgba(124, 58, 237, 0.12), transparent 32%),
    rgba(255, 255, 255, 0.94);
}

.focus-mode-shell.is-complete > .focus-mode-topbar,
.focus-mode-shell.is-complete > .focus-mode-layout {
  display: none;
}

.session-completion-screen {
  position: relative;
  display: flex;
  width: min(760px, calc(100% - 40px));
  height: 100%;
  min-height: 100%;
  margin: auto;
  padding: 42px 24px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  box-sizing: border-box;
  overflow-y: auto;
}

.session-completion-screen[hidden] {
  display: none;
}

.session-completion-brand {
  position: absolute;
  top: 30px;
  left: 50%;
  display: inline-flex;
  transform: translateX(-50%);
}

.session-completion-brand .brand-lockup {
  height: 28px;
  width: auto;
}

.session-completion-mark {
  display: grid;
  width: 78px;
  height: 78px;
  margin: 22px 0 18px;
  place-items: center;
  border: 7px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  color: #fff;
  background: var(--brand-gradient);
  box-shadow: 0 18px 36px rgba(109, 93, 252, 0.24);
}

.session-completion-kicker {
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.session-completion-screen h2 {
  margin: 0;
  color: #111827;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.04em;
}

.session-completion-screen h2:focus {
  outline: none;
}

.session-completion-copy {
  max-width: 480px;
  margin: 12px 0 28px;
  color: #64748b;
  font-size: 1rem;
  line-height: 1.6;
}

.session-completion-stats {
  display: grid;
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.session-completion-stats article {
  padding: 18px 14px;
  border: 1px solid rgba(99, 102, 241, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.06);
}

.session-completion-stats span {
  display: block;
  margin-bottom: 7px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.session-completion-stats strong {
  color: #111827;
  font-size: 1.3rem;
}

.session-completion-actions {
  display: flex;
  margin-top: 28px;
  gap: 10px;
  justify-content: center;
}

.session-completion-actions .btn {
  min-width: 156px;
}

.session-completion-return {
  margin: 18px 0 0;
  color: #94a3b8;
  font-size: 0.82rem;
}

.session-completion-return strong {
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.focus-mode-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 16px;
  min-height: 88px;
  padding: 10px 24px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.1);
  background: rgba(255, 255, 255, 0.88);
}

.focus-mode-brand {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  color: var(--gray-900);
  font-size: 1.65rem;
  line-height: 1;
  grid-column: 1;
  grid-row: 1 / span 2;
}

.focus-mode-brand .brand-lockup {
  height: 1.12em;
}

.focus-mode-brand .logo-mark {
  width: 0.875em;
  height: 0.875em;
  flex-basis: 0.875em;
}

.focus-mode-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  grid-column: 3;
  grid-row: 1;
  gap: 12px;
}

.focus-connection-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border-radius: 999px;
  color: #64748b;
  background: #f1f5f9;
  font-size: 0.875rem;
  font-weight: 700;
}

.focus-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.focus-connection-status.connected {
  color: #047857;
  background: #ecfdf5;
}

.focus-connection-status.connected .focus-status-dot {
  background: #10b981;
}

.focus-leave-button {
  padding: 9px 14px;
  border: 1px solid #d9dceb;
  border-radius: 10px;
  color: #475569;
  background: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.focus-leave-button:hover {
  background: #f8fafc;
}

.focus-abort-button {
  padding: 8px 4px;
  border: 0;
  color: #b91c1c;
  background: transparent;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  cursor: pointer;
}

.focus-abort-button:hover {
  text-decoration: underline;
}

.focus-mode-layout {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: stretch;
  gap: 16px;
  padding: 16px;
  overflow: hidden;
}

.focus-video-card,
.focus-session-card {
  min-height: 0;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(79, 70, 229, 0.08);
}

.focus-video-card {
  position: sticky;
  top: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  padding: 14px;
}

.focus-video-statusbar {
  display: none;
}

.focus-wrap-up-notice {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 4px 12px;
  padding: 12px 14px;
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-radius: 14px;
  color: #065f46;
  background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
}

.focus-wrap-up-notice[hidden] {
  display: none;
}

.focus-wrap-up-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  color: #fff;
  background: #10b981;
  font-weight: 900;
}

.focus-wrap-up-notice strong,
.focus-wrap-up-notice p {
  margin: 0;
}

.focus-wrap-up-notice p {
  margin-top: 2px;
  color: #047857;
  font-size: 0.875rem;
}

.focus-wrap-up-notice.is-final-countdown {
  border-color: rgba(245, 158, 11, 0.42);
  color: #92400e;
  background: #fffbeb;
}

.focus-wrap-up-notice.is-final-countdown p {
  color: #b45309;
}

.focus-mode-topbar > .focus-timer-compact {
  position: relative;
  z-index: 3;
  grid-column: 2;
  grid-row: 1 / span 2;
  justify-self: center;
  gap: 18px;
  width: max-content;
  min-height: 0;
  margin: 0;
  padding: 8px 18px 8px 10px;
  border: 1px solid rgba(99, 102, 241, 0.14);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(79, 70, 229, 0.08);
}

.focus-mode-topbar > .focus-timer-compact .focus-timer-ring {
  width: 88px;
  height: 88px;
  min-width: 88px;
}

.focus-mode-topbar > .focus-timer-compact .focus-timer-ring span {
  width: 68px;
  height: 68px;
  background: #fff;
}

.focus-mode-topbar > .focus-timer-compact .focus-timer-kicker {
  color: #7c3aed;
  font-size: 0.78rem;
}

.focus-mode-topbar > .focus-timer-compact .video-timer {
  color: #111827;
  font-size: 2.55rem;
}

.focus-mode-kicker {
  display: block;
  margin-bottom: 5px;
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.focus-private-label {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--primary);
  background: #f3f1ff;
  font-size: 0.875rem;
  font-weight: 700;
}

.video-container {
  min-height: 0;
  flex: 1;
  position: relative;
  padding: 1px;
  border: 1px solid rgba(99, 102, 241, 0.14);
  border-radius: 15px;
  background: #fff;
  overflow: hidden;
  isolation: isolate;
}

.daily-loading-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.875rem;
}

.daily-container {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 13px;
}

.focus-session-card {
  --focus-content-background: #f7f7ff;
  --focus-content-border: #dddfff;
  display: flex;
  flex-direction: column;
  height: auto;
  padding: 18px;
  overflow: hidden;
}

.focus-goal {
  padding: 16px;
  border: 1px solid var(--focus-content-border);
  border-radius: 14px;
  background: var(--focus-content-background);
}

.focus-goal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}

.focus-goal-heading span {
  color: #111827;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.3;
}

.focus-goal strong {
  display: block;
  color: #4f46e5;
  font-size: 0.875rem;
  line-height: 1.45;
}

.focus-goal strong[hidden] {
  display: none;
}

.focus-goal-edit {
  padding: 2px 0;
  border: 0;
  color: var(--primary-dark);
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.focus-goal-edit:hover {
  text-decoration: underline;
}

.focus-goal-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.focus-goal-form[hidden] {
  display: none;
}

.focus-goal-form input {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--primary);
  border-radius: 9px;
  color: #111827;
  background: #fff;
  font: inherit;
  font-size: 0.85rem;
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.focus-goal-form button {
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--primary);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.focus-goal-form .focus-goal-cancel {
  color: #64748b;
  background: transparent;
}

.focus-timer-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}

.focus-timer-compact {
  flex: 0 0 auto;
  flex-direction: row;
  gap: 18px;
  min-height: 0;
  padding: 18px 6px;
}

.focus-timer-compact .focus-timer-ring {
  width: 82px;
  height: 82px;
  min-width: 82px;
  margin: 0;
}

.focus-timer-compact .focus-timer-ring span {
  width: 64px;
  height: 64px;
}

.focus-timer-copy {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
}

.focus-timer-kicker {
  margin-bottom: 2px;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.focus-timer-compact .video-timer {
  font-size: 2.7rem;
  line-height: 1;
}

.focus-task-panel {
  min-height: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 250px;
  padding: 15px;
  border: 1px solid var(--focus-content-border);
  border-radius: 14px;
  background: var(--focus-content-background);
}

.focus-task-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.focus-task-heading h3 {
  margin: 0;
  color: #111827;
  font-size: 1rem;
}

.focus-task-share-all {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #5b54c7;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.focus-task-share-all input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--primary);
}

.focus-task-input {
  margin-bottom: 10px;
}

.focus-task-input .task-input {
  min-width: 0;
  padding: 9px 11px;
  font-size: 0.875rem;
}

.focus-task-input .task-add-btn {
  padding: 8px 10px;
}

.focus-task-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding-right: 0;
}

.focus-task-list .task-item {
  padding: 8px 6px;
}

.focus-task-list .task-text {
  font-size: 0.875rem;
}

.focus-task-list .task-empty {
  padding: 18px 6px;
}

.focus-timer-ring {
  --progress: 0deg;
  width: 110px;
  height: 110px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border-radius: 50%;
  background: conic-gradient(
    var(--primary) 0deg,
    var(--secondary) var(--progress),
    #e9e7ff var(--progress)
  );
  transform: rotate(-90deg);
}

.focus-timer-ring span {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #fff;
}

.focus-timer-ring.is-wrap-up {
  background: conic-gradient(#10b981 var(--progress), #d1fae5 0);
}

.focus-timer-ring.is-final-countdown {
  animation: focusFinalCountdownPulse 1s ease-in-out infinite;
}

@keyframes focusFinalCountdownPulse {
  50% { transform: rotate(-90deg) scale(1.04); }
}

.video-timer {
  color: #111827;
  font-size: 2.45rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.focus-session-note {
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid #eef0f4;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.45;
}

.focus-partner-task-panel {
  display: flex;
  flex: 0 1 190px;
  min-height: 120px;
  max-height: 190px;
  flex-direction: column;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--focus-content-border);
  border-radius: 14px;
  background: var(--focus-content-background);
}

.focus-partner-task-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.focus-partner-task-heading h3 {
  margin: 0;
  color: #111827;
  font-size: 0.9rem;
}

.focus-partner-level {
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--primary-dark);
  background: var(--primary-bg);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.focus-partner-task-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.focus-partner-task {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid #e5e7eb;
  border-radius: 9px;
  color: #374151;
  background: #f8fafc;
  font-size: 0.875rem;
  line-height: 1.4;
}

.focus-partner-task > span:first-child {
  color: var(--primary);
  font-weight: 800;
}

.focus-partner-task.completed > span:last-child {
  color: #94a3b8;
  text-decoration: line-through;
}

.focus-partner-task-empty {
  margin: 0;
  color: #94a3b8;
  font-size: 0.875rem;
  line-height: 1.5;
}

[data-theme="dark"] .focus-mode-overlay {
  background:
    radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.15), transparent 38%),
    linear-gradient(180deg, #0b0f18 0%, #111325 100%);
}

[data-theme="dark"] .focus-mode-shell {
  border-color: #2b3150;
  background: rgba(15, 20, 32, 0.94);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.42);
}

[data-theme="dark"] .focus-mode-shell.is-complete {
  background:
    radial-gradient(circle at 50% 18%, rgba(124, 58, 237, 0.18), transparent 32%),
    rgba(15, 20, 32, 0.97);
}

[data-theme="dark"] .session-completion-screen h2,
[data-theme="dark"] .session-completion-stats strong {
  color: #f8fafc;
}

[data-theme="dark"] .session-completion-copy,
[data-theme="dark"] .session-completion-stats span {
  color: #9aa5ba;
}

[data-theme="dark"] .session-completion-stats article {
  border-color: #30394d;
  background: rgba(23, 29, 43, 0.88);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .session-completion-return {
  color: #7f8ba1;
}

[data-theme="dark"] .session-completion-return strong {
  color: #aeb8ca;
}

[data-theme="dark"] .focus-mode-topbar {
  border-bottom-color: #242c3d;
  background: rgba(18, 24, 39, 0.94);
}

[data-theme="dark"] .focus-video-card,
[data-theme="dark"] .focus-session-card {
  border-color: #283145;
  background: #121827;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.24);
}

[data-theme="dark"] .focus-mode-topbar > .focus-timer-compact {
  border-color: #30394d;
  background: #171d2b;
}

[data-theme="dark"] .focus-private-label {
  color: #a5b4fc;
  background: #20213d;
}

[data-theme="dark"] .focus-wrap-up-notice {
  border-color: rgba(52, 211, 153, 0.3);
  color: #a7f3d0;
  background: rgba(6, 78, 59, 0.3);
}

[data-theme="dark"] .focus-wrap-up-notice p {
  color: #6ee7b7;
}

[data-theme="dark"] .focus-wrap-up-notice.is-final-countdown {
  border-color: rgba(251, 191, 36, 0.38);
  color: #fde68a;
  background: rgba(120, 53, 15, 0.3);
}

[data-theme="dark"] .focus-wrap-up-notice.is-final-countdown p {
  color: #fcd34d;
}

[data-theme="dark"] .focus-connection-status {
  color: #b7c0d1;
  background: #1b2232;
}

[data-theme="dark"] .focus-connection-status.connected {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
}

[data-theme="dark"] .focus-leave-button {
  border-color: #30394d;
  color: #cbd5e1;
  background: #171d2b;
}

[data-theme="dark"] .focus-leave-button:hover {
  background: #20283a;
}

[data-theme="dark"] .focus-abort-button {
  color: #fca5a5;
}

[data-theme="dark"] .focus-session-card {
  --focus-content-background: #171d2b;
  --focus-content-border: #30394d;
}

[data-theme="dark"] .focus-goal {
  border-color: #30394d;
  background: #171d2b;
}

[data-theme="dark"] .focus-session-note {
  color: #9aa5ba;
}

[data-theme="dark"] .focus-goal-heading span {
  color: #f8fafc;
}

[data-theme="dark"] .focus-goal strong {
  color: #a5b4fc;
}

[data-theme="dark"] .focus-goal-form input {
  color: #f8fafc;
  background: #0f1420;
}

[data-theme="dark"] .focus-goal-form .focus-goal-cancel {
  color: #9aa5ba;
}

[data-theme="dark"] .focus-timer-kicker {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .focus-timer-ring {
  background: conic-gradient(
    var(--primary) 0deg,
    var(--secondary) var(--progress),
    #293144 var(--progress)
  );
}

[data-theme="dark"] .focus-timer-ring.is-wrap-up {
  background: conic-gradient(#34d399 var(--progress), #183a35 0);
}

[data-theme="dark"] .focus-timer-ring span {
  background: #121827;
}

[data-theme="dark"] .video-timer {
  color: #f8fafc;
}

[data-theme="dark"] .focus-mode-topbar > .focus-timer-compact .focus-timer-ring span {
  background: #171d2b;
}

[data-theme="dark"] .focus-mode-topbar > .focus-timer-compact .video-timer {
  color: #f8fafc;
}

[data-theme="dark"] .focus-session-note {
  border-top-color: #283145;
}

[data-theme="dark"] .focus-task-panel,
[data-theme="dark"] .focus-partner-task-panel {
  border-color: var(--focus-content-border);
  background: var(--focus-content-background);
}

[data-theme="dark"] .focus-task-heading h3,
[data-theme="dark"] .focus-partner-task-heading h3 {
  color: #f8fafc;
}

[data-theme="dark"] .focus-partner-task {
  color: #cbd5e1;
  border-color: #30394d;
  background: #171d2b;
}

[data-theme="dark"] .focus-partner-task-empty {
  color: #7f8ba1;
}

@media (max-width: 900px) {
  .focus-mode-overlay { padding: 0; }
  .focus-mode-shell {
    height: 100dvh;
    min-height: 100svh;
    border: 0;
    border-radius: 0;
    overflow-anchor: none;
    overscroll-behavior-y: contain;
  }
  .focus-mode-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    flex: 0 0 auto;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 22px rgba(79, 70, 229, 0.08);
  }
  .focus-mode-layout {
    flex: 0 0 auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    overflow: visible;
  }
  .focus-video-card {
    position: static;
    height: auto;
    min-height: 360px;
  }
  .focus-session-card {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  .focus-task-panel {
    display: block;
    min-height: 0;
    flex: none;
  }
  .focus-task-list {
    overflow: visible;
  }
  .focus-partner-task-panel {
    display: block;
    min-height: 0;
    max-height: none;
    flex: none;
  }
  .focus-partner-task-list {
    overflow: visible;
  }
  .focus-timer-wrap { min-height: 190px; }
}

@media (max-width: 900px) {
  [data-theme="dark"] .focus-mode-topbar {
    background: rgba(15, 20, 32, 0.98);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
  }
}

@media (max-width: 560px) {
  .focus-mode-topbar {
    grid-template-columns: 1fr auto;
    gap: 10px 12px;
    padding: 12px 14px;
  }
  .focus-mode-brand {
    grid-column: 1;
    grid-row: 1;
  }
  .focus-mode-actions {
    grid-column: 2;
    grid-row: 1;
  }
  .focus-mode-topbar > .focus-timer-compact {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .focus-mode-actions { gap: 7px; }
  .focus-abort-button,
  .focus-leave-button { font-size: 0.75rem; }
  .focus-leave-button { padding: 8px 10px; }
  .focus-mode-layout { padding: 12px; gap: 12px; }
  .focus-connection-status { display: none; }
  .focus-video-card,
  .focus-session-card { padding: 14px; border-radius: 18px; }
  .focus-video-statusbar { display: none; }
  .focus-private-label { display: none; }
  .session-completion-screen {
    width: 100%;
    padding: 78px 18px 28px;
    justify-content: flex-start;
  }
  .session-completion-brand { top: 24px; }
  .session-completion-mark {
    width: 66px;
    height: 66px;
    margin-top: 6px;
  }
  .session-completion-stats { grid-template-columns: 1fr; }
  .session-completion-stats article {
    display: flex;
    padding: 14px 16px;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }
  .session-completion-stats span { margin: 0; }
  .session-completion-actions {
    width: 100%;
    flex-direction: column;
  }
  .session-completion-actions .btn { width: 100%; }
}

/* ============================================
   Join Button on Booked Slots
   ============================================ */
.wk-joinable .wk-booked-card {
  border: 1px solid rgba(99, 102, 241, 0.52);
  border-left: 3px solid var(--primary);
  background: linear-gradient(135deg, #ede9fe, #eef2ff);
  box-shadow: 0 7px 18px rgba(79, 70, 229, 0.2);
  animation: joinPulse 2s ease-in-out infinite;
}

.wk-joinable {
  cursor: pointer;
}

.wk-joinable:focus-visible {
  z-index: 4;
  outline: 3px solid rgba(99, 102, 241, 0.28);
  outline-offset: -3px;
}

@keyframes joinPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(99, 102, 241, 0); }
}

/* ============================================
   Sidebar Account Menu
   ============================================ */
.sidebar-user {
  position: relative;
  cursor: pointer;
}

.sidebar-chevron {
  margin-left: auto;
  opacity: 0.4;
  transition: transform 0.2s, opacity 0.2s;
  flex-shrink: 0;
}

.sidebar-user.open .sidebar-chevron {
  transform: rotate(180deg);
  opacity: 0.7;
}

.sidebar-account-menu {
  display: none;
  position: absolute;
  bottom: 8px;
  left: calc(100% + 12px);
  right: auto;
  width: 250px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 6px;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  z-index: 3200;
}

.sidebar-user {
  display: block;
  flex-shrink: 0;
  padding: 0;
  cursor: default;
}

.sidebar-user-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 12px 16px;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font: inherit;
  text-align: left;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color var(--transition);
}

.sidebar-user-trigger:hover,
.sidebar-user.open .sidebar-user-trigger {
  background: rgba(99,102,241,0.06);
}

.sidebar-user-trigger:focus-visible {
  outline: 3px solid rgba(99,102,241,0.22);
  outline-offset: -3px;
}

.sidebar-user-info {
  min-width: 0;
}

.sidebar-account-menu {
  scrollbar-width: thin;
}

#kontoeinstellungen,
#abo-zahlung {
  scroll-margin-top: 24px;
}

/* ============================================
   Sessions overview
   ============================================ */
.session-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.session-summary-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 104px;
  padding: 24px 26px;
  border: 1px solid var(--gray-100);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.session-summary-card::before {
  position: absolute;
  top: 0;
  right: 22px;
  left: 22px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: var(--brand-gradient);
  opacity: 0.68;
  content: "";
}

.session-summary-card span { color: var(--gray-500); font-size: 0.875rem; }
.session-summary-card strong { color: var(--primary); font-size: 1.65rem; }
.sessions-card { padding: 0; overflow: hidden; }

.sessions-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 28px;
  border-bottom: 1px solid var(--gray-100);
}

.sessions-toolbar h3 { margin: 0 0 4px; font-size: 1.15rem; }
.sessions-toolbar p { color: var(--gray-500); font-size: 0.875rem; }
.session-filter { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--gray-100); }
.session-filter button { padding: 8px 14px; color: var(--gray-500); border: 0; border-radius: 999px; background: transparent; cursor: pointer; font: inherit; font-size: 0.875rem; font-weight: 600; }
.session-filter button.active { color: var(--white); background: var(--brand-gradient); box-shadow: var(--shadow-sm); }
.sessions-list { display: flex; flex-direction: column; }

.session-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 20px 28px;
  border-bottom: 1px solid var(--gray-100);
}

.session-row:last-child { border-bottom: 0; }
.session-date-tile { display: grid; place-items: center; width: 54px; height: 58px; border-radius: 14px; color: var(--primary); background: var(--primary-bg); }
.session-date-tile strong { font-size: 1.25rem; line-height: 1; }
.session-date-tile span { font-size: 0.875rem; text-transform: uppercase; }
.session-row-main > div { display: flex; align-items: center; gap: 8px; }
.session-row-main p { margin-top: 5px; color: var(--gray-500); font-size: 0.875rem; }
.session-type-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-gradient); }
.session-row-meta { display: flex; align-items: flex-end; flex-direction: column; gap: 7px; color: var(--gray-500); font-size: 0.875rem; }
.session-status { padding: 5px 10px; border-radius: 999px; color: #047857; background: #ecfdf5; font-size: 0.875rem; font-weight: 700; }
.session-status.past { color: var(--gray-500); background: var(--gray-100); }
.session-report-button { border: 0; padding: 0; background: transparent; color: var(--gray-500); font: inherit; font-size: 0.875rem; text-decoration: underline; cursor: pointer; }
.session-report-button:hover { color: var(--danger); }
.report-modal textarea { width: 100%; resize: vertical; min-height: 120px; }
.empty-state-icon { margin-bottom: 10px; color: var(--primary); font-size: 2rem; }

/* --- Globale Problemmeldung --- */
.bug-report-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
}

.bug-report-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 46px;
  height: 46px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  color: var(--white);
  background: var(--brand-gradient);
  box-shadow: 0 12px 28px rgba(79, 70, 229, 0.28);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 750;
  transition: width 180ms ease, gap 180ms ease, padding 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.bug-report-trigger span {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  opacity: 0;
  transition: max-width 180ms ease, opacity 130ms ease;
}

.bug-report-trigger:hover,
.bug-report-trigger:focus-visible {
  width: 164px;
  gap: 8px;
  padding: 0 14px;
  box-shadow: 0 15px 34px rgba(79, 70, 229, 0.34);
  transform: translateY(-2px);
}

.bug-report-trigger:hover span,
.bug-report-trigger:focus-visible span {
  max-width: 110px;
  opacity: 1;
}

.bug-report-trigger:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.24);
  outline-offset: 3px;
}

.bug-report-modal {
  max-width: 560px;
  padding: 0;
  overflow: hidden auto;
  border: 1px solid rgba(99, 102, 241, 0.16);
}

.bug-report-close {
  z-index: 1;
}

.bug-report-header {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 30px 58px 25px 30px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.14);
  background:
    radial-gradient(circle at 92% 0%, rgba(139, 92, 246, 0.18), transparent 46%),
    linear-gradient(135deg, rgba(238, 242, 255, 0.95), rgba(250, 245, 255, 0.92));
}

.bug-report-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--white);
  background: var(--brand-gradient);
  box-shadow: 0 10px 22px rgba(79, 70, 229, 0.22);
}

.bug-report-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.bug-report-header h2 {
  margin: 0;
  color: var(--gray-900);
  font-size: 1.38rem;
}

.bug-report-header p {
  margin: 7px 0 0;
  color: var(--gray-600);
  font-size: 0.88rem;
  line-height: 1.55;
}

.bug-report-form {
  display: grid;
  gap: 17px;
  padding: 25px 30px 28px;
}

.bug-report-field {
  display: grid;
  gap: 7px;
}

.bug-report-field > span {
  color: var(--gray-800);
  font-size: 0.84rem;
  font-weight: 750;
}

.bug-report-field small {
  color: var(--gray-400);
  font-size: 0.74rem;
  font-weight: 600;
}

.bug-report-field input,
.bug-report-field textarea {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 13px;
  color: var(--gray-900);
  background: var(--white);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.5;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.bug-report-field input {
  height: 44px;
  padding: 0 13px;
}

.bug-report-field textarea {
  min-height: 0;
  padding: 11px 13px;
  resize: vertical;
}

.bug-report-field input:focus,
.bug-report-field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.bug-report-details {
  border: 1px solid var(--gray-200);
  border-radius: 13px;
  background: var(--gray-50);
}

.bug-report-details summary {
  position: relative;
  padding: 11px 36px 11px 13px;
  color: var(--gray-700);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 750;
  list-style: none;
}

.bug-report-details summary::-webkit-details-marker {
  display: none;
}

.bug-report-details summary::after {
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--primary);
  content: "+";
  font-size: 1.1rem;
  transform: translateY(-50%);
}

.bug-report-details[open] summary::after {
  content: "−";
}

.bug-report-details summary small {
  color: var(--gray-400);
  font-size: 0.72rem;
  font-weight: 600;
}

.bug-report-details .bug-report-field {
  padding: 0 11px 11px;
}

.bug-report-consent {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: 13px;
  color: var(--gray-500);
  background: rgba(238, 242, 255, 0.52);
  font-size: 0.74rem;
  line-height: 1.55;
}

.bug-report-consent input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: var(--primary);
}

.bug-report-consent a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.bug-report-status {
  min-height: 0;
  margin: -4px 0 0;
  color: var(--gray-500);
  font-size: 0.82rem;
  line-height: 1.45;
}

.bug-report-status:empty {
  display: none;
}

.bug-report-status[data-type="error"] {
  color: #b91c1c;
}

.bug-report-status[data-type="success"] {
  color: #047857;
}

.bug-report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.bug-report-actions .btn {
  min-width: 122px;
}

.focus-mode-overlay.active ~ .bug-report-widget {
  display: none;
}

[data-theme="dark"] .bug-report-modal {
  border-color: #30394d;
}

[data-theme="dark"] .bug-report-header {
  border-bottom-color: #30394d;
  background:
    radial-gradient(circle at 92% 0%, rgba(139, 92, 246, 0.19), transparent 46%),
    linear-gradient(135deg, #171d2b, #1b1933);
}

[data-theme="dark"] .bug-report-header h2,
[data-theme="dark"] .bug-report-field > span {
  color: #f8fafc;
}

[data-theme="dark"] .bug-report-header p,
[data-theme="dark"] .bug-report-field small,
[data-theme="dark"] .bug-report-status {
  color: #9aa5ba;
}

[data-theme="dark"] .bug-report-field input,
[data-theme="dark"] .bug-report-field textarea {
  border-color: #30394d;
  color: #f8fafc;
  background: #0f1420;
}

[data-theme="dark"] .bug-report-details {
  border-color: #30394d;
  background: #171d2b;
}

[data-theme="dark"] .bug-report-details summary {
  color: #dbe1eb;
}

[data-theme="dark"] .bug-report-consent {
  border-color: #30394d;
  color: #aeb7c8;
  background: rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .bug-report-status[data-type="error"] {
  color: #fca5a5;
}

[data-theme="dark"] .bug-report-status[data-type="success"] {
  color: #6ee7b7;
}

@media (max-width: 768px) {
  .bug-report-widget {
    right: 18px;
    bottom: calc(92px + env(safe-area-inset-bottom));
  }

  .bug-report-trigger {
    width: 44px;
    height: 44px;
  }

  .bug-report-trigger span {
    display: none;
  }

  .bug-report-trigger:hover,
  .bug-report-trigger:focus-visible {
    width: 44px;
    padding: 0;
    transform: none;
  }
}

@media (max-width: 560px) {
  .bug-report-overlay {
    align-items: flex-end;
    padding: 10px;
  }

  .bug-report-modal {
    max-height: calc(100vh - 20px);
    border-radius: 22px;
  }

  .bug-report-header {
    gap: 12px;
    padding: 23px 50px 20px 20px;
  }

  .bug-report-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .bug-report-form {
    gap: 14px;
    padding: 20px;
  }

  .bug-report-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .bug-report-actions .btn {
    min-width: 0;
  }
}

/* Dark app surfaces */
[data-theme="dark"] .app-body { background: radial-gradient(circle at 90% 0%, rgba(99,102,241,0.16), transparent 28%), #0b0f18; }
[data-theme="dark"] .app-sidebar,
[data-theme="dark"] .app-card,
[data-theme="dark"] .app-stat-card,
[data-theme="dark"] .session-summary-card { background: #121827; border-color: #242c3d; }
[data-theme="dark"] .sidebar-link:hover { background: #171d2b; border-color: #30394d; }
[data-theme="dark"] .sidebar-link.active {
  background: linear-gradient(135deg, rgba(99,102,241,0.20), rgba(139,92,246,0.14));
  border-color: rgba(129,140,248,0.32);
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}
[data-theme="dark"] .app-header-panel {
  border-color: transparent;
  background:
    linear-gradient(135deg, #151b2b, #1b1b36) padding-box,
    linear-gradient(135deg, rgba(129,140,248,0.58), rgba(139,92,246,0.34), rgba(99,102,241,0.20)) border-box;
}
[data-theme="dark"] .sidebar-account-menu { background: #171d2b; border-color: #30394d; }
[data-theme="dark"] .wk-header { color: var(--gray-800); background: #121827; border-color: #30394d; }
[data-theme="dark"] .quick-join-card {
  border-color: #34375b;
  background: rgba(23, 26, 48, 0.72);
}
[data-theme="dark"] .quick-join-copy strong { color: #f8fafc; }
[data-theme="dark"] .cal-nav-btn { color: var(--gray-600); background: #171d2b; border-color: #30394d; }
[data-theme="dark"] .wk-corner,
[data-theme="dark"] .wk-day-header,
[data-theme="dark"] .wk-time-label { background: #171d2b; }
[data-theme="dark"] .wk-day-header.wk-past,
[data-theme="dark"] .wk-past-slot { background: #0f1420; border-color: #20283a; }
[data-theme="dark"] .wk-day-header.wk-today,
[data-theme="dark"] .wk-today-col { background: rgba(99,102,241,0.09); }
[data-theme="dark"] .wk-today-col.wk-past-slot { background: #121827; }
[data-theme="dark"] .wk-duration-panel { background: linear-gradient(135deg, #171a30, #1c1931); border-color: #303653; }
[data-theme="dark"] .day-impulse-card,
[data-theme="dark"] .day-impulse-popover { color: #cbd5e1; background: #171d2b; border-color: #30394d; }
[data-theme="dark"] .day-impulse-copy strong,
[data-theme="dark"] .day-impulse-popover > strong,
[data-theme="dark"] .day-impulse-popover li b { color: #f8fafc; }
[data-theme="dark"] .day-impulse-popover li:nth-child(odd) { background: #121827; }
[data-theme="dark"] .wk-view-picker { background: #0f1420; border-color: #30394d; }
[data-theme="dark"] .wk-type-content { background: rgba(15,20,32,0.72); border-color: #30394d; }
[data-theme="dark"] .wk-booked-short .wk-booked-card { background: #20213d; }
[data-theme="dark"] .wk-booked-long .wk-booked-card {
  border-left-color: #a78bfa;
  background: linear-gradient(135deg, #2e2450, #262341);
}
[data-theme="dark"] .wk-booked-long .wk-booked-type { color: #c4b5fd; }
[data-theme="dark"] .wk-unmatched .wk-booked-card { background: #242c3d; }
[data-theme="dark"] .wk-open-session-card {
  border-color: rgba(129, 140, 248, 0.34);
  background: linear-gradient(135deg, #242542, #20213d);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
[data-theme="dark"] .wk-open-session-copy strong { color: #f8fafc; }
[data-theme="dark"] .wk-open-session-copy small { color: #c4b5fd; }
[data-theme="dark"] .wk-open-session-avatar { border-color: #242542; }
[data-theme="dark"] .wk-booked-duration { color: #cbd5e1; background: rgba(15,20,32,0.72); }
[data-theme="dark"] .wk-type-btn.active .wk-type-content {
  color: #f8fafc;
  border-color: rgba(129,140,248,0.78);
  background: linear-gradient(135deg, #20213d, #252348);
  box-shadow: 0 10px 26px rgba(0,0,0,0.3);
}
[data-theme="dark"] .wk-type-btn.active .wk-type-content::after { border-color: #20213d; }
[data-theme="dark"] .wk-slot:hover:not(.wk-past-slot):not(.wk-booked):not(.wk-occupied):not(.wk-too-soon):not(.wk-open-session)::before {
  border-color: rgba(129,140,248,0.42);
  border-left-color: #818cf8;
  background: rgba(32,33,61,0.94);
  box-shadow: 0 8px 18px rgba(0,0,0,0.24);
}
[data-theme="dark"] .profile-card-main,
[data-theme="dark"] .dashboard-chart-card { background: radial-gradient(circle at 50% -20%, rgba(99,102,241,0.15), transparent 40%), #121827; }
[data-theme="dark"] .profile-name-section {
  border-color: rgba(129,140,248,0.24);
  background: rgba(23,29,43,0.72);
}
[data-theme="dark"] .profile-weekly-usage {
  border-color: rgba(129,140,248,0.3);
  background: linear-gradient(135deg, rgba(49,46,129,0.3), #171d2b);
}
[data-theme="dark"] .profile-weekly-usage.is-pro {
  border-color: rgba(52,211,153,0.3);
  background: linear-gradient(135deg, rgba(6,78,59,0.32), #171d2b);
}
[data-theme="dark"] .profile-referral-card {
  border-color: rgba(129,140,248,0.3);
  background:
    radial-gradient(circle at 100% 0%, rgba(139,92,246,0.18), transparent 34%),
    linear-gradient(135deg, rgba(49,46,129,0.2), #121827);
}
[data-theme="dark"] .profile-referral-heading h3,
[data-theme="dark"] .profile-referral-status strong { color: #f8fafc; }
[data-theme="dark"] .profile-referral-help button,
[data-theme="dark"] .profile-referral-link-row input,
[data-theme="dark"] .profile-referral-status > div {
  border-color: #30394d;
  background: rgba(23,29,43,0.78);
}
[data-theme="dark"] .profile-referral-level {
  color: #c4b5fd;
  border-color: rgba(167,139,250,0.3);
  background: rgba(91,33,182,0.2);
}
[data-theme="dark"] .profile-weekly-usage-copy strong,
[data-theme="dark"] .profile-premium-stat strong,
[data-theme="dark"] .profile-premium-upgrade strong { color: #f8fafc; }
[data-theme="dark"] .profile-premium-insights {
  border-color: transparent;
  background:
    radial-gradient(circle at 100% 0%, rgba(99,102,241,0.18), transparent 34%) padding-box,
    linear-gradient(#121827, #121827) padding-box,
    var(--profile-premium-frame) border-box;
}
[data-theme="dark"] .profile-premium-insights.is-unlocked {
  border-color: transparent;
  background:
    radial-gradient(circle at 100% 0%, rgba(99,102,241,0.18), transparent 34%) padding-box,
    linear-gradient(#121827, #121827) padding-box,
    var(--profile-premium-frame) border-box;
}
[data-theme="dark"] .profile-premium-badge { border-color: #121827; }
[data-theme="dark"] .profile-premium-stat {
  border-color: #30394d;
  background: rgba(23,29,43,0.88);
}
[data-theme="dark"] .profile-premium-upgrade { background: rgba(99,102,241,0.12); }
[data-theme="dark"] .profile-avatar-modal-card {
  color: var(--gray-800);
  border-color: #30394d;
  background: #121827;
}
[data-theme="dark"] .profile-avatar-modal-close {
  color: var(--gray-600);
  border-color: #30394d;
  background: #171d2b;
}
[data-theme="dark"] .profile-avatar-modal-close:hover {
  color: #a5b4fc;
  border-color: rgba(129,140,248,0.42);
  background: rgba(99,102,241,0.12);
}
[data-theme="dark"] .profile-avatar-modal-card > img { background: #0f1420; }
[data-theme="dark"] .profile-avatar-crop-help { color: var(--gray-500); }
[data-theme="dark"] .profile-avatar-crop-stage {
  background:
    linear-gradient(45deg, #20283a 25%, transparent 25%),
    linear-gradient(-45deg, #20283a 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #20283a 75%),
    linear-gradient(-45deg, transparent 75%, #20283a 75%),
    #171d2b;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
}
[data-theme="dark"] .profile-avatar-crop-zoom { color: var(--gray-700); }
[data-theme="dark"] .dashboard-week-card .app-stat-card { background: #171d2b; border-color: #283145; }
[data-theme="dark"] .task-input,
[data-theme="dark"] .task-edit-input { color: var(--gray-800); background: #0f1420; }
[data-theme="dark"] .task-item.dragging { background: #171d2b; border-color: #6366f1; }
[data-theme="dark"] .session-status { color: #6ee7b7; background: rgba(16,185,129,0.12); }

@media (max-width: 1024px) {
  .dashboard-overview-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .dashboard-week-card .app-stats-row { grid-template-columns: 1fr 1fr; }
  .session-summary-grid { grid-template-columns: 1fr; }
  .sessions-toolbar { align-items: flex-start; flex-direction: column; }
  .session-row { grid-template-columns: 52px 1fr; padding: 18px; }
  .session-row-meta { grid-column: 2; align-items: flex-start; }
  .profile-section-heading { flex-direction: column; gap: 8px; }
  .task-card .app-card-header { align-items: flex-start; flex-direction: column; gap: 7px; }
}

.sidebar-user.open .sidebar-account-menu {
  display: block;
  animation: menuFadeIn 0.15s ease;
}

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

.account-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  text-decoration: none;
  transition: background 0.15s;
}

button.account-menu-item {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.account-menu-item:hover {
  background: var(--gray-100);
}

.account-menu-item svg {
  opacity: 0.5;
  flex-shrink: 0;
}

.account-menu-divider {
  height: 1px;
  background: var(--gray-100);
  margin: 4px 8px;
}

.account-menu-logout {
  color: #dc2626;
}

.account-menu-logout:hover {
  background: #fef2f2;
}

.account-menu-logout svg {
  opacity: 0.7;
  stroke: #dc2626;
}

[data-theme="dark"] .profile-form input,
[data-theme="dark"] .profile-form select,
[data-theme="dark"] .booking-modal input,
[data-theme="dark"] .booking-modal select {
  color: var(--gray-800);
  background: #0f1420;
  border-color: #30394d;
}

[data-theme="dark"] .profile-form input:disabled {
  color: var(--gray-500);
  background: #171d2b;
}

/* ============================================
   Session Matching Notice
   ============================================ */
.focus-matching-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: center;
  gap: 7px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 12px;
  padding: 7px 11px 7px 8px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 999px;
  color: #4c4f72;
  background: linear-gradient(135deg, rgba(238, 242, 255, 0.96), rgba(245, 243, 255, 0.92));
}

.focus-matching-notice[hidden] {
  display: none;
}

.focus-matching-notice strong {
  color: #3730a3;
  font-size: 0.8rem;
  white-space: nowrap;
}

.focus-matching-notice p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.2;
  white-space: nowrap;
}

.focus-matching-separator {
  color: #9aa1bc;
}

.focus-matching-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 3px;
}

.focus-matching-actions[hidden] {
  display: none;
}

.focus-matching-actions button {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 999px;
  color: #4338ca;
  background: rgba(255, 255, 255, 0.84);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 750;
  cursor: pointer;
}

.focus-matching-actions button.primary {
  color: #fff;
  border-color: transparent;
  background: var(--brand-gradient);
}

.focus-matching-actions button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.focus-matching-notice.is-closed {
  border-color: rgba(148, 163, 184, 0.24);
  background: #f8fafc;
}

.focus-mode-topbar > .focus-matching-notice {
  width: max-content;
  max-width: 340px;
  grid-column: 3;
  grid-row: 2;
  justify-self: end;
  margin: 0;
  padding: 8px 12px;
}

.focus-mode-topbar > .focus-matching-notice:not(.has-actions) {
  flex-wrap: nowrap;
}

.focus-mode-topbar > .focus-matching-notice.has-actions .focus-matching-actions {
  width: 100%;
  margin: 2px 0 0;
  justify-content: flex-end;
}

.focus-mode-topbar > .focus-matching-notice strong,
.focus-mode-topbar > .focus-matching-notice p {
  font-size: 0.84rem;
}

[data-theme="dark"] .focus-matching-notice {
  color: #b9c1d6;
  border-color: #37365c;
  background: linear-gradient(135deg, rgba(39, 42, 76, 0.92), rgba(31, 34, 59, 0.9));
}

[data-theme="dark"] .focus-matching-notice strong {
  color: #c7d2fe;
}

[data-theme="dark"] .focus-matching-actions button:not(.primary) {
  color: #c7d2fe;
  border-color: #48476e;
  background: rgba(15, 20, 32, 0.72);
}

@media (max-width: 1050px) {
  .focus-mode-topbar {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .focus-mode-brand {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .focus-mode-topbar > .focus-timer-compact {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .focus-mode-actions {
    grid-column: 3;
    grid-row: 1;
  }

  .focus-mode-topbar > .focus-matching-notice {
    width: auto;
    max-width: 100%;
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
  }
}

/* ============================================
   Session-only Focus Sounds
   ============================================ */
.focus-session-card {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.focus-sound-panel {
  position: relative;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  flex: 0 0 auto;
  margin-top: 16px;
  margin-bottom: 18px;
  padding: 2px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.focus-sound-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.focus-sound-heading h3 {
  margin: 0;
  color: #111827;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.3;
}

.focus-sound-controller {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.focus-sound-play {
  position: relative;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 15px;
  color: #fff;
  background: var(--brand-gradient);
  box-shadow: 0 9px 20px rgba(99, 102, 241, 0.25);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.focus-sound-play:hover:not(:disabled) {
  box-shadow: 0 12px 24px rgba(99, 102, 241, 0.32);
  transform: translateY(-1px);
}

.focus-sound-play:disabled {
  cursor: wait;
  opacity: 0.7;
}

.focus-sound-play-icon {
  width: 0;
  height: 0;
  margin-left: 3px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
}

.focus-sound-pause-icon {
  width: 12px;
  height: 14px;
  border-right: 4px solid currentColor;
  border-left: 4px solid currentColor;
}

.focus-sound-spinner {
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: focusSoundSpin 0.7s linear infinite;
}

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

.focus-sound-current {
  min-width: 0;
  display: flex;
  align-items: center;
}

.focus-sound-current strong,
.focus-sound-current > span,
.focus-sound-current small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus-sound-current strong {
  color: #111827;
  font-size: 0.9rem;
}

.focus-sound-current > span {
  color: #64748b;
  font-size: 0.875rem;
}

.focus-sound-current small {
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 700;
}

.focus-sound-current small[data-tone="playing"] {
  color: var(--primary-dark);
}

.focus-sound-current small[data-tone="error"] {
  color: #b91c1c;
}

.focus-sound-expand {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 9px;
  border: 1px solid #e0e2f5;
  border-radius: 10px;
  color: #5b54c7;
  background: #fff;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 800;
  cursor: pointer;
}

.focus-sound-expand svg {
  transition: transform var(--transition);
}

.focus-sound-expand.active svg {
  transform: rotate(180deg);
}

.focus-sound-volume {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  color: #8b90a7;
  font-size: 0.875rem;
  font-weight: 800;
}

.focus-sound-volume input {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

.focus-sound-browser {
  position: absolute;
  top: calc(100% - 2px);
  right: 0;
  left: 0;
  z-index: 20;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(31, 41, 55, 0.2);
}

.focus-sound-browser[hidden] {
  display: none;
}

.focus-sound-options {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.focus-sound-option {
  position: relative;
  min-width: 0;
  min-height: 60px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 12px 10px;
  border: 1px solid #e3e5f1;
  border-radius: 13px;
  color: #374151;
  background: rgba(255, 255, 255, 0.9);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.focus-sound-option:hover {
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.08);
  transform: translateY(-1px);
}

.focus-sound-option.selected {
  border-color: #8b82ff;
  box-shadow:
    0 0 0 1px rgba(139, 130, 255, 0.24),
    0 9px 22px rgba(99, 102, 241, 0.13);
}

.focus-sound-selected-badge {
  position: absolute;
  top: -16px;
  right: 8px;
  display: none;
  padding: 3px 8px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: var(--brand-gradient);
  box-shadow: 0 5px 12px rgba(99, 102, 241, 0.24);
  font-size: 0.875rem;
  font-weight: 800;
  white-space: nowrap;
}

.focus-sound-option.selected .focus-sound-selected-badge {
  display: block;
}

.focus-sound-option-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: #6d63e8;
  background: #f0efff;
  font-size: 1.05rem;
  font-weight: 800;
}

.focus-sound-option-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.focus-sound-option-copy strong,
.focus-sound-option-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus-sound-option-copy strong {
  color: #111827;
  font-size: 0.875rem;
}

.focus-sound-option-copy small {
  margin-top: 2px;
  color: #7c879d;
  font-size: 0.875rem;
}

[data-theme="dark"] .focus-sound-panel {
  background: transparent;
}

[data-theme="dark"] .focus-sound-browser {
  border-color: #30394d;
  background: #171d2b;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

[data-theme="dark"] .focus-sound-heading h3,
[data-theme="dark"] .focus-sound-current strong,
[data-theme="dark"] .focus-sound-option-copy strong {
  color: #f8fafc;
}

[data-theme="dark"] .focus-sound-option-icon {
  color: #c4b5fd;
  border-color: #3b3f60;
  background: #242542;
}

[data-theme="dark"] .focus-sound-expand,
[data-theme="dark"] .focus-sound-option {
  color: #c4b5fd;
  border-color: #30394d;
  background: #121827;
}

[data-theme="dark"] .focus-sound-option.selected {
  border-color: #818cf8;
}

[data-theme="dark"] .focus-sound-selected-badge {
  border-color: #171d2b;
}

[data-theme="dark"] .focus-sound-current > span,
[data-theme="dark"] .focus-sound-option-copy small {
  color: #9aa5ba;
}

.wk-late-join-slot:not(.wk-booked) {
  cursor: pointer;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.06));
}

.wk-late-join-slot:not(.wk-booked) .wk-slot-avail {
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 800;
}

/* ============================================
   Mobile App Navigation
   ============================================ */
.mobile-app-nav {
  display: none;
}

@media (max-width: 768px) {
  .app-body {
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
  }

  .mobile-app-nav {
    position: fixed;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 900;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 7px;
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 42px rgba(31, 41, 55, 0.2);
    backdrop-filter: blur(18px);
  }

  .mobile-app-nav-link {
    position: relative;
    min-width: 0;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 14px;
    flex-direction: column;
    color: #7c879d;
    font-size: 0.875rem;
    font-weight: 700;
    text-align: center;
  }

  .mobile-app-nav-link.active {
    color: var(--primary);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.13), rgba(139, 92, 246, 0.08));
  }

  .mobile-app-nav-link.active::before {
    position: absolute;
    top: 5px;
    width: 18px;
    height: 3px;
    border-radius: 999px;
    background: var(--brand-gradient);
    content: "";
  }

  [data-theme="dark"] .mobile-app-nav {
    border-color: #30394d;
    background: rgba(18, 24, 39, 0.94);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.38);
  }

  [data-theme="dark"] .mobile-app-nav-link {
    color: #8d99ad;
  }

  [data-theme="dark"] .mobile-app-nav-link.active {
    color: #a5b4fc;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.12));
  }

  .focus-mode-overlay.active ~ .mobile-app-nav {
    display: none;
  }
}

@media (max-width: 560px) {
  .focus-mode-topbar {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 10px 12px;
    padding: 12px 14px;
  }

  .focus-mode-brand {
    grid-column: 1;
    grid-row: 1;
  }

  .focus-mode-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .focus-mode-topbar > .focus-timer-compact {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .focus-mode-topbar > .focus-matching-notice {
    width: 100%;
    max-width: 100%;
    grid-column: 1 / -1;
    grid-row: 3;
    justify-content: center;
  }

  .focus-matching-notice {
    justify-content: center;
    border-radius: 18px;
  }

  .focus-matching-actions {
    width: 100%;
    justify-content: center;
    margin: 2px 0 0;
  }

  .focus-sound-panel {
    padding: 13px;
  }

  .focus-sound-controller {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .focus-sound-expand {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .focus-sound-browser {
    max-height: 320px;
    overflow-y: auto;
  }

  .focus-sound-options {
    grid-template-columns: 1fr;
  }
}
