@import url("https://fonts.googleapis.com/css2?family=Rubik:wght@300;400;500;700&display=swap");

:root {
  --bg: #07111f;
  --card: rgba(10, 18, 34, 0.88);
  --text: #edf3ff;
  --muted: #8fa3c2;
  --accent: #0f3f8f;
  --accent-soft: rgba(15, 63, 143, 0.2);
  --border: rgba(184, 32, 54, 0.22);
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  --gold: #d4af37;
  --danger-deep: #7d1023;
  --overlay-width: 300px;
  --overlay-gap: 12px;
  /* Increase vertical room in week/day view */
  --hour-height: 54px;
  --hour-rail-width: 70px;
  --sidebar-width: 250px;
}

* {
  box-sizing: border-box;
}

html {
  /* iPhone PWA (black-translucent status bar + viewport-fit=cover): the strip behind the clock is the page itself → keep it navy, never white (Sharon 4.11) */
  background-color: #050c18;
  /* Prevent Safari pull-to-refresh / overscroll bounce */
  overscroll-behavior: none;
  overscroll-behavior-y: none;
}

body {
  overscroll-behavior-y: none;
  margin: 0;
  font-family: "Rubik", "Heebo", sans-serif;
  background:
    radial-gradient(1000px 700px at 15% -10%, rgba(15, 63, 143, 0.34) 0%, rgba(7, 17, 31, 0) 60%),
    radial-gradient(900px 640px at 105% 10%, rgba(125, 16, 35, 0.28) 0%, rgba(7, 17, 31, 0) 58%),
    linear-gradient(180deg, #050c18 0%, #081223 100%);
  color: var(--text);
  overflow-x: hidden;
  /* Prevent Safari pull-to-refresh / bounce scroll */
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  /* Prevent iOS touch callout on long press */
  -webkit-touch-callout: none;
}

/* Touch long-press = right-click (app.main.js, touchLongPressStep): no iOS text selection / loupe under the held finger.
   Only while the finger is held — on an editable cell user-select:none would also stop the tap that starts editing. */
.touch-long-press-hold,
.touch-long-press-hold * {
  -webkit-user-select: none !important;
  user-select: none !important;
}

.daily-ops-modal {
  position: fixed;
  inset: 0;
  z-index: 2600;
  background: rgba(3, 8, 16, 0.68);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.daily-ops-card {
  width: min(860px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: linear-gradient(180deg, rgba(9, 19, 36, 0.98), rgba(8, 18, 34, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  padding: 28px;
  position: relative;
}

.daily-ops-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 18px;
}

.daily-ops-kicker {
  color: #9bb7ff;
  font-weight: 700;
  margin-bottom: 8px;
}

.daily-ops-heading {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  margin-bottom: 8px;
}

.daily-ops-subtitle {
  color: var(--muted);
  margin-bottom: 20px;
}

.daily-ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.daily-ops-block {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 22px;
  padding: 18px;
}

.daily-ops-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}

.daily-ops-line {
  color: #d9e6ff;
  margin-top: 6px;
}

.daily-ops-ok {
  width: 100%;
  margin-top: 18px;
}

body.sidebar-collapsed {
  --sidebar-width: 64px;
}

body.license-locked .app > *:not(#license-overlay) {
  visibility: hidden;
}

.app {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

body.overlay-open .main {
  margin-right: calc(var(--overlay-width) + var(--overlay-gap));
  transition: margin-right 0.25s ease;
}

.sidebar {
  padding: 24px 18px;
  background:
    linear-gradient(180deg, rgba(5, 12, 24, 0.98), rgba(8, 18, 35, 0.98)),
    linear-gradient(160deg, #091325, #111827);
  color: #f5f6fb;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  user-select: none;
  -webkit-user-select: none;
}

.sidebar.collapsed {
  padding: 16px 8px;
}

.sidebar.collapsed .brand-title,
.sidebar.collapsed .brand-sub,
.sidebar.collapsed .section-title,
.sidebar.collapsed .auth-box #auth-status,
.sidebar.collapsed .auth-box #auth-login,
.sidebar.collapsed .auth-box #auth-logout,
.sidebar.collapsed .auth-box #auth-toggle,
.sidebar.collapsed .auth-box #account-plan-pill {
  display: none;
}

.sidebar.collapsed .brand {
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.sidebar.collapsed .logo {
  width: 44px;
  height: 44px;
  font-size: 14px;
}

.sidebar.collapsed .pill {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 12px;
  justify-content: center;
  align-items: center;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  font-size: 18px;
}

.sidebar.collapsed .pill .pill-text {
  display: none !important;
}

.sidebar.collapsed .pill .pill-icon {
  margin: 0 !important;
  min-width: 0;
  font-size: 18px;
}

.sidebar.collapsed .pill-badge {
  position: absolute;
  top: -4px;
  right: -4px;
}

.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
  -webkit-user-select: none;
}

.pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  font-size: 16px;
}

.pill-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  user-select: none;
  -webkit-user-select: none;
}

.brand-main {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
}

.brand-copy {
  min-width: 0;
}

.icon-btn {
  margin-right: auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.settings-under-brand {
  margin-right: auto;
  flex: 0 0 auto;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(148, 163, 184, 0.32);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-title {
  font-weight: 700;
  font-size: 14px;
}

.brand-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.sidebar.collapsed .brand-main {
  flex-direction: column;
  justify-content: center;
}

.sidebar.collapsed .settings-under-brand {
  margin-right: 0;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  user-select: none;
  -webkit-user-select: none;
}

.calendar-sidebar-views {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 8px;
  margin-top: -2px;
}

.calendar-subview-pill {
  width: 88%;
  min-width: 92px;
  min-height: 28px;
  padding: 6px 10px;
  justify-content: center;
  font-size: 12px;
  line-height: 1.1;
  border-radius: 10px;
  border-color: rgba(212, 175, 55, 0.38);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 8px;
}

.assistant-pill {
  position: relative;
}

.pill-badge {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.pill-badge.hidden {
  display: none;
}

.section-title {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

.pill {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
  cursor: pointer;
  text-align: right;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pill.active {
  background: rgba(15, 63, 143, 0.34);
  border-color: rgba(212, 175, 55, 0.5);
}

.pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  font-size: 16px;
}

.pill-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-box {
  background: rgba(255, 255, 255, 0.08);
  padding: 12px;
  border-radius: 12px;
  display: grid;
  gap: 8px;
}

#auth-status {
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  word-break: break-word;
}

.auth-box .primary {
  background: linear-gradient(135deg, #14532d, #22c55e);
  color: #ffffff;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.25);
}

.auth-box .ghost {
  background: linear-gradient(135deg, #7f1d1d, #ef4444);
  color: #ffffff;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.22);
}

.auth-box .auth-connect {
  background: linear-gradient(135deg, #14532d, #22c55e);
  box-shadow: 0 10px 24px rgba(34, 197, 94, 0.25);
}

.auth-box .auth-disconnect {
  background: linear-gradient(135deg, #7f1d1d, #ef4444);
  box-shadow: 0 10px 24px rgba(239, 68, 68, 0.22);
}

.primary {
  background: linear-gradient(135deg, #1d4ed8, #38bdf8);
  color: white;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(29, 78, 216, 0.25);
}

.ghost {
  background: transparent;
  border: 1px solid rgba(143, 163, 194, 0.32);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.main {
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.workspace-panel {
  min-height: 0;
  flex: 1;
}

.workspace-panel.hidden {
  display: none !important;
}

.team-permissions-view {
  min-height: 0;
  overflow: hidden;
}

.team-permissions-layout {
  display: grid;
  gap: 16px;
  overflow: auto;
  padding-left: 4px;
}

.topbar {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  z-index: 20;
}

.workspace-topbar {
  flex: 0 0 auto;
}

.top-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
}

.workspace-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.workspace-subtitle {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

.page-sub {
  color: var(--muted);
  font-size: 14px;
}

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

.top-actions.center-actions {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  justify-content: center;
}

.top-actions.right-actions {
  margin-right: 8px;
}

.inbox-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.inbox-btn.active {
  border-color: rgba(96, 165, 250, 0.52);
  background: rgba(37, 99, 235, 0.18);
}

.inbox-btn-count {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
}

.internal-feed {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(15, 63, 143, 0.14), rgba(125, 16, 35, 0.08)),
    rgba(10, 18, 34, 0.86);
  box-shadow: var(--shadow);
}

.feed-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
  direction: ltr;
}

.feed-layout > * {
  direction: rtl;
}

.internal-feed-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.internal-feed-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.internal-feed-kicker {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.internal-feed-title {
  margin: 4px 0 0;
  font-size: 20px;
}

.internal-access-badge {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(143, 163, 194, 0.28);
  color: var(--muted);
  white-space: nowrap;
}

.internal-access-badge.allowed {
  color: #d8f7e4;
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.12);
}

.internal-access-badge.blocked {
  color: #ffd8de;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(125, 16, 35, 0.22);
}

.internal-feed-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 14px;
  position: relative;
  align-items: start;
}

.internal-feed-composer-shell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(143, 163, 194, 0.2);
  background: rgba(5, 12, 24, 0.7);
  padding: 6px 8px;
}

.composer-mini-btn {
  min-width: 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
}

/* Mobile + button wrapper — hidden on desktop */
.composer-mobile-plus-wrap {
  display: none;
  position: relative;
  align-items: center;
}

/* The ＋ button itself */
.composer-plus-btn {
  min-width: 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  color: var(--text);
  border: 1px solid rgba(143, 163, 194, 0.25);
  background: rgba(15, 63, 143, 0.18);
  transition: background 0.18s, transform 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.composer-plus-btn.open {
  background: rgba(15, 63, 143, 0.38);
  transform: rotate(45deg);
}

/* Dropdown that opens upward (above the textarea) */
.composer-plus-dropdown {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  background: rgba(8, 17, 35, 0.97);
  border: 1px solid rgba(143, 163, 194, 0.22);
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.4);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 4px;
  /* Animation */
  transform-origin: bottom left;
  animation: composerDropIn 0.18s ease;
}

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

.composer-plus-dropdown.hidden {
  display: none;
}

.composer-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 15px;
  text-align: right;
  width: 100%;
  justify-content: flex-start;
  border: none;
  background: transparent;
  color: var(--text);
  transition: background 0.15s;
}

.composer-dropdown-item:hover,
.composer-dropdown-item:active {
  background: rgba(15, 63, 143, 0.25);
}

.composer-dropdown-item span {
  font-size: 15px;
  font-weight: 500;
}

.internal-feed-composer textarea {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  max-height: 180px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 0 14px;
  resize: none;
  font: inherit;
  line-height: 1.5;
  overflow: auto;
}

.internal-feed-composer textarea:focus {
  outline: none;
}

.feed-composer-popover {
  position: absolute;
  top: calc(100% - 4px);
  right: 0;
  min-width: 170px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(143, 163, 194, 0.25);
  background: rgba(8, 17, 35, 0.96);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  z-index: 20;
}

.feed-composer-popover-body {
  overscroll-behavior-y: none;
  display: grid;
  gap: 8px;
}

.feed-composer-popover-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.feed-composer-popover .primary,
.feed-composer-popover .ghost {
  width: 100%;
  justify-content: center;
}

.internal-feed-attachments-preview {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.internal-feed-attachment-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(143, 163, 194, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.internal-feed-attachment-card img,
.internal-feed-attachment-card video {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 12px;
  background: rgba(5, 12, 24, 0.88);
  cursor: pointer;
}

.internal-feed-attachment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.internal-feed-list {
  display: grid;
  gap: 10px;
  flex: 1;
  min-height: 320px;
  overflow: auto;
}

.internal-feed-empty,
.internal-feed-item {
  border-radius: 16px;
  border: 1px solid rgba(143, 163, 194, 0.14);
  background: rgba(255, 255, 255, 0.03);
  padding: 14px 16px;
}

.internal-feed-item-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.internal-feed-author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.internal-feed-author.is-clickable {
  cursor: pointer;
}

.internal-feed-author.is-clickable:hover strong {
  color: #dbeafe;
}

.internal-feed-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: rgba(15, 63, 143, 0.28);
  color: #fff;
  font-weight: 700;
  border: 1px solid rgba(212, 175, 55, 0.22);
}

.internal-feed-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.internal-feed-item-text {
  line-height: 1.5;
  white-space: pre-wrap;
}

.internal-feed-item-text.is-collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.internal-feed-expand-btn {
  display: block;
  border: 0;
  background: transparent;
  color: #d4af37;
  font-weight: 700;
  cursor: pointer;
  margin: 12px auto 0;
  text-align: center;
}

.internal-feed-item-image {
  width: 100%;
  max-height: 340px;
  object-fit: cover;
  border-radius: 14px;
  margin-top: 12px;
  cursor: zoom-in;
  border: 1px solid rgba(143, 163, 194, 0.16);
  background: rgba(5, 12, 24, 0.88);
}

.internal-feed-item-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.internal-feed-read-btn,
.internal-feed-archive-btn {
  min-width: 104px;
}

.internal-feed-archive-btn.active {
  border-color: rgba(96, 165, 250, 0.52);
  background: rgba(37, 99, 235, 0.18);
}

.internal-feed-read-badge {
  color: var(--muted);
  font-size: 12px;
}

.internal-feed-item.is-reading-out {
  animation: feedReadSlideOut 280ms ease forwards;
}

.feed-image-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
}

.feed-image-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 6, 16, 0.74);
  backdrop-filter: blur(8px);
}

.feed-image-modal-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 1100px);
  max-height: 90vh;
  display: grid;
  gap: 12px;
  justify-items: center;
  padding-top: 18px;
}

.feed-image-modal-card img,
.feed-image-modal-card video {
  width: 100%;
  max-height: calc(90vh - 64px);
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid rgba(143, 163, 194, 0.2);
  background: rgba(5, 12, 24, 0.9);
}

.feed-image-modal-close {
  position: absolute;
  top: -2px;
  right: 0;
  min-width: 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 999px;
}

.feed-image-modal-card img.hidden,
.feed-image-modal-card video.hidden {
  display: none;
}

.teleprompter-card {
  width: min(1440px, calc(100vw - 20px));
  max-height: min(92vh, 980px);
  display: flex;
  flex-direction: column;
}

.teleprompter-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
}

.teleprompter-controls {
  display: grid;
  gap: 14px;
  min-height: 0;
}

.teleprompter-field {
  display: grid;
  gap: 8px;
}

.teleprompter-field span {
  color: var(--muted);
  font-size: 13px;
}

.teleprompter-field textarea {
  min-height: 220px;
  resize: vertical;
  border-radius: 16px;
  border: 1px solid rgba(143, 163, 194, 0.2);
  background: rgba(5, 12, 24, 0.74);
  color: var(--text);
  padding: 14px;
  font: inherit;
  line-height: 1.55;
}

.teleprompter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.teleprompter-row-tight {
  grid-template-columns: 1fr;
}

.teleprompter-toggle {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(143, 163, 194, 0.16);
  background: rgba(255, 255, 255, 0.03);
}

.teleprompter-actions {
  justify-content: flex-start;
}

.teleprompter-stage-shell {
  min-height: 0;
  display: flex;
}

.teleprompter-stage {
  flex: 1;
  min-height: 420px;
  max-height: 78vh;
  overflow: auto;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #000000;
  padding: 36px 34px 48px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.teleprompter-content {
  white-space: pre-wrap;
  line-height: 1.65;
  font-size: 44px;
  font-weight: 500;
  color: #f8fbff;
  text-align: center;
}

.teleprompter-content.is-mirrored {
  transform: scaleX(-1);
}

.teleprompter-content.is-flipped-y {
  transform: scaleY(-1);
}

.teleprompter-content.is-mirrored.is-flipped-y {
  transform: scale(-1, -1);
}

@media (max-width: 980px) {
  .teleprompter-layout {
    grid-template-columns: 1fr;
  }

  .teleprompter-stage {
    min-height: 320px;
    max-height: 46vh;
    padding: 24px 18px 30px;
  }

  .teleprompter-content {
    font-size: 34px;
  }
}

@media (max-width: 640px) {
  .teleprompter-card {
    width: min(100vw - 12px, 100%);
    max-height: 96vh;
    padding: 14px;
  }

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

  .teleprompter-field textarea {
    min-height: 160px;
  }

  .teleprompter-stage {
    min-height: 260px;
    max-height: 42vh;
    border-radius: 18px;
  }

  .teleprompter-content {
    font-size: 28px;
    line-height: 1.55;
  }
}

.member-profile-popover {
  position: fixed;
  top: 88px;
  right: 360px;
  z-index: 120;
}

.member-profile-card {
  width: min(360px, calc(100vw - 40px));
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  background: rgba(8, 17, 35, 0.96);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  padding: 18px;
  position: relative;
}

.member-profile-close {
  position: absolute;
  left: 14px;
  top: 14px;
  min-width: 40px;
  height: 40px;
}

.member-profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.member-profile-edit {
  margin-inline-start: auto;
  min-width: 42px;
  height: 42px;
}

.member-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid rgba(212, 175, 55, 0.22);
  background: rgba(20, 52, 124, 0.42);
  font-weight: 800;
  color: #fff;
}

.member-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.member-profile-main {
  display: grid;
  gap: 2px;
}

.member-profile-main strong {
  font-size: 20px;
}

.member-profile-main span {
  color: var(--muted);
  font-size: 13px;
}

.member-profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.member-profile-grid div,
.member-profile-progress {
  border-radius: 14px;
  border: 1px solid rgba(143, 163, 194, 0.12);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 12px;
}

.member-profile-grid span,
.member-profile-progress-row span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.member-profile-grid strong,
.member-profile-progress-row strong {
  display: block;
  color: var(--text);
}

.member-profile-progress {
  display: grid;
  gap: 10px;
}

.member-profile-edit-panel {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.member-profile-edit-actions {
  display: grid;
}

.member-profile-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.member-profile-progress-row strong.is-warning {
  color: #fbbf24;
}

.onb-form-grid {
  display: grid;
  gap: 12px;
}

.onb-field {
  display: grid;
  gap: 8px;
}

.onb-field label {
  color: #dbeafe;
  font-size: 14px;
  font-weight: 600;
}

.onb-field input,
.onb-field select {
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(143, 163, 194, 0.22);
  background: rgba(5, 12, 24, 0.76);
  color: var(--text);
  padding: 0 14px;
}

.onb-field small {
  color: var(--muted);
  font-size: 12px;
}

.birthdate-split-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr;
  gap: 10px;
  direction: rtl;
  align-items: start;
}

.birthdate-box {
  display: grid;
  gap: 6px;
  align-content: start;
}

.birthdate-box label {
  color: #cbd5e1;
  font-size: 12px;
}

.birthdate-box input {
  text-align: center;
  letter-spacing: 0.08em;
  width: 100%;
  min-height: 58px;
}

.birthdate-box.has-error input {
  border-color: rgba(239, 68, 68, 0.72);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.18);
}

.birthdate-error-bubble {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 6px auto;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(127, 29, 29, 0.96);
  border: 1px solid rgba(248, 113, 113, 0.55);
  color: #fee2e2;
  font-size: 12px;
  line-height: 1.35;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.birthdate-error-bubble::after {
  content: "";
  position: absolute;
  bottom: -7px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: inherit;
  border-right: 1px solid rgba(248, 113, 113, 0.55);
  border-bottom: 1px solid rgba(248, 113, 113, 0.55);
  transform: rotate(45deg);
}

.birthdate-error-bubble.hidden {
  display: none;
}

.underage-approval-box {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.24);
  background: rgba(120, 53, 15, 0.12);
}

.underage-approval-box.hidden {
  display: none;
}

.onb-video-frame {
  width: 100%;
  min-height: 320px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.7);
}

.onb-body.step-enter {
  animation: onboardingSlideIn 240ms ease;
}

@keyframes onboardingSlideIn {
  0% {
    opacity: 0;
    transform: translateX(28px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes feedReadSlideOut {
  0% {
    opacity: 1;
    transform: translateX(0);
    max-height: 220px;
    margin-bottom: 0;
  }
  100% {
    opacity: 0;
    transform: translateX(-80px);
    max-height: 0;
    margin-bottom: -10px;
    padding-top: 0;
    padding-bottom: 0;
  }
}

@media (max-width: 980px) {
  .internal-feed-composer,
  .crm-quick-add {
    grid-template-columns: 1fr;
  }

  .internal-feed-header {
    flex-direction: column;
  }

  .training-preview-grid {
    grid-template-columns: 1fr;
  }

  .member-profile-popover {
    right: 20px;
    left: 20px;
    top: 80px;
  }

  .member-profile-grid {
    grid-template-columns: 1fr;
  }
}

#trash-btn {
  margin-left: var(--hour-rail-width);
}

.calendar-select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  min-width: 160px;
  cursor: pointer;
}

.sidebar .calendar-select {
  width: 100%;
  min-width: unset;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}

.calendar-picker {
  position: fixed;
  inset: 0;
  z-index: 1400;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.calendar-picker.hidden {
  display: none !important;
}

.calendar-picker-card {
  width: min(520px, 92vw);
  max-height: 80vh;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calendar-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calendar-picker-title {
  font-weight: 700;
  font-size: 16px;
}

.calendar-picker-list {
  overflow: auto;
  display: grid;
  gap: 8px;
}

.calendar-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e6ebf5;
  background: #f8fbff;
}

.calendar-picker-item input {
  width: 18px;
  height: 18px;
}

.calendar-picker-name {
  font-weight: 400;
}

.calendar-picker-actions {
  display: flex;
  justify-content: flex-end;
}

.calendar-wrap {
  position: relative;
  display: block;
  padding-left: var(--hour-rail-width);
  padding-bottom: 10px;
  direction: ltr;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(245,248,255,0.9));
  border-radius: 18px;
  border: 1px solid rgba(30, 64, 175, 0.08);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.08);
}

.calendar-wrap.chaos-sim .event-block {
  animation: chaosToOrder 620ms ease;
}

@keyframes chaosToOrder {
  0% {
    transform: translate3d(var(--jitter-x, 0px), var(--jitter-y, 0px), 0) scale(0.985);
    opacity: 0.8;
  }
  40% {
    transform: translate3d(calc(var(--jitter-x, 0px) * -0.2), calc(var(--jitter-y, 0px) * -0.2), 0) scale(1.01);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
}

.crm-view,
.recruitment-view {
  padding: 18px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
}

.crm-view.hidden,
.recruitment-view.hidden {
  display: none;
}

#feed-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

#calendar-workspace {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.workspace-tab.active {
  border-color: rgba(96, 165, 250, 0.52);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.34), rgba(14, 165, 233, 0.2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.crm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.crm-tabs-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 0;
  max-width: 100%;
  overflow: hidden;
}

.crm-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.crm-tabs::-webkit-scrollbar,
.crm-actions::-webkit-scrollbar {
  height: 6px;
}
.crm-tabs::-webkit-scrollbar-thumb,
.crm-actions::-webkit-scrollbar-thumb {
  background: rgba(143, 163, 194, 0.3);
  border-radius: 4px;
}
.crm-tabs::-webkit-scrollbar-track,
.crm-actions::-webkit-scrollbar-track {
  background: transparent;
}

.crm-tab {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  max-width: 260px;
  padding: 8px 16px 9px;
  border-radius: 14px 14px 0 0;
  border: 1px solid rgba(143, 163, 194, 0.2);
  border-bottom-color: transparent;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.crm-tab.dragging {
  cursor: grabbing !important;
}

.crm-tab.drag-placeholder {
  opacity: 0.35 !important;
  transform: scale(0.88) !important;
  border: 1.5px dashed rgba(96, 165, 250, 0.45) !important;
  background: rgba(96, 165, 250, 0.05) !important;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.6) !important;
}

.crm-tab.drag-ghost {
  position: fixed !important;
  pointer-events: none !important;
  z-index: 99999 !important;
  background: rgba(15, 63, 143, 0.82) !important;
  border: 2px solid #d4af37 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5) !important;
  opacity: 0.8 !important;
  transform: scale(0.92) !important;
  border-radius: 14px !important;
}

.crm-dragging-active .crm-tab:not(.drag-ghost):not(.drag-placeholder) {
  transition: transform 0.25s cubic-bezier(0.2, 1, 0.2, 1) !important;
}

.crm-tab-title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
  color: #f8fafc;
}

.crm-tab-count {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.1;
  color: rgba(226, 232, 240, 0.58);
  font-weight: 600;
}

.crm-tab.active {
  background: rgba(15, 63, 143, 0.28);
  color: var(--text);
  border-color: rgba(212, 175, 55, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.crm-tab.active .crm-tab-count {
  color: rgba(248, 250, 252, 0.72);
}

.crm-tab-add {
  min-width: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 12px;
  font-size: 24px;
  line-height: 1;
}

.crm-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.crm-actions {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  direction: ltr;
  width: 100%;
  overflow-x: auto;
  padding-bottom: 2px;
}

.crm-action-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  direction: rtl;
}

/* "לידים לקמפיין ניתוח עמוד: N" — read-only count next to the CRM tools */
.crm-pr-campaign {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.1);
  color: #f3d77a;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: default;
}

.crm-search-shell {
  display: inline-flex;
  align-items: stretch;
  min-width: 320px;
  width: min(620px, 46vw);
  max-width: min(620px, 46vw);
  flex: 0 0 min(620px, 46vw);
  direction: rtl;
  margin-inline-start: auto;
}

.crm-search-input {
  min-width: 0;
  width: 100%;
  min-height: 42px;
  border-radius: 0 12px 12px 0;
  border: 1px solid rgba(143, 163, 194, 0.22);
  border-left: 0;
  background: rgba(5, 12, 24, 0.72);
  color: var(--text);
  padding: 0 14px;
}

.crm-search-input::placeholder {
  color: var(--muted);
}

.crm-search-attach {
  min-width: 126px;
  border-radius: 12px 0 0 12px;
  border-right: 1px solid rgba(143, 163, 194, 0.22);
}

.crm-quick-add {
  width: 100%;
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.9fr 1.4fr auto;
  gap: 10px;
}

.crm-quick-add input,
.crm-quick-add select {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(143, 163, 194, 0.22);
  background: rgba(5, 12, 24, 0.72);
  color: var(--text);
  padding: 0 12px;
}

.crm-live-metrics {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-inline-start: auto;
}

.crm-kpi {
  min-width: 180px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(143, 163, 194, 0.14);
  border-radius: 12px;
  padding: 8px 10px;
}

.crm-kpi-label {
  font-size: 11px;
  color: var(--muted);
}

.internal-login-screen {
  position: relative;
  min-height: calc(100vh - 88px);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.internal-login-logo-bg {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(560px, 72vw);
  opacity: 0.1;
  filter: blur(8px);
  pointer-events: none;
}

.internal-login-card {
  position: relative;
  z-index: 1;
  width: min(640px, 92vw);
  padding: 32px 28px;
  border-radius: 28px;
  border: 1px solid rgba(212, 175, 55, 0.18);
  background: rgba(7, 17, 31, 0.78);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  text-align: center;
  backdrop-filter: blur(10px);
}

.training-hub {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(143, 163, 194, 0.16);
  background: rgba(10, 18, 34, 0.74);
  box-shadow: var(--shadow);
}

.training-preview h3 {
  margin: 0 0 12px;
  text-align: center;
}

.training-preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.training-preview-grid article {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(143, 163, 194, 0.14);
}

.crm-kpi-value {
  margin-top: 3px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 700;
  color: #0f172a;
}

.crm-kpi-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #334155;
}

.crm-kpi-pulse {
  min-width: 220px;
}

.pulse-track {
  margin-top: 6px;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

.pulse-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ef4444 0%, #f59e0b 45%, #22c55e 100%);
  transition: width 320ms ease;
}

.crm-table-wrap {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  padding: 14px;
  overflow: visible;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  position: relative;
}

.crm-table-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: auto;
}

.crm-table {
  width: 100%;
  min-width: 1100px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 15px;
  color: #0f172a;
}

.crm-table thead {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--bg);
}

.crm-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
}

.crm-table th,
.crm-table td {
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  border-left: 1px dashed rgba(15, 23, 42, 0.12);
  padding: 10px 8px;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
}

.crm-table td {
  text-align: right;
}

.crm-table td.crm-td-attempts,
.crm-table td.crm-td-answer {
  text-overflow: clip;
}

.crm-table th.has-tooltip {
  overflow: visible;
}

.crm-table th:last-child,
.crm-table td:last-child {
  border-left: 0;
}

.crm-opportunity-row td {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.08), rgba(251, 191, 36, 0.02));
}

.crm-table tbody tr:hover td {
  background: rgba(245, 238, 204, 0.42);
}

.crm-table tbody tr.crm-opportunity-row:hover td {
  background: linear-gradient(180deg, rgba(251, 191, 36, 0.12), rgba(251, 191, 36, 0.05));
}

.crm-table th {
  font-weight: 600;
  color: #1f2937;
  background: rgba(148, 163, 184, 0.5);
  position: sticky;
  top: 0;
  z-index: 2;
  backdrop-filter: blur(3px);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: background 0.15s, color 0.15s;
}

.crm-table th:hover {
  background: rgba(148, 163, 184, 0.65);
  color: #000;
}

.crm-table th.sorted {
  background: rgba(15, 63, 143, 0.12) !important;
  color: #0f3f8f !important;
  font-weight: 700;
  border-bottom: 2px solid #0f3f8f !important;
}

.crm-table th.sorted:hover {
  background: rgba(15, 63, 143, 0.2) !important;
  color: #0f3f8f !important;
}

.crm-col-sort-indicator {
  margin-right: 4px;
  font-size: 11px;
  opacity: 0.35;
  transition: opacity 0.15s;
  display: inline-block;
  vertical-align: middle;
}

.crm-table th:hover .crm-col-sort-indicator {
  opacity: 0.75;
}

.crm-col-sort-indicator.active {
  opacity: 1 !important;
  color: #0f3f8f !important;
  font-weight: bold;
}

.crm-table th .crm-col-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  width: 100%;
}

.crm-col-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
}

.crm-col-label {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  white-space: nowrap;
}

.crm-compact .crm-col-label {
  display: inline-block;
  font-size: 11px;
  max-width: 42px;
}

.crm-cell {
  outline: none;
  min-height: 18px;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crm-cell-phone {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.crm-cell-email {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

/* ₪ prefix for proposal + payment columns */
td:has(.crm-cell-currency) {
  position: relative;
}
.crm-cell-currency {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
  font-variant-numeric: tabular-nums;
  /* padding to leave space for the ₪ on the right (RTL: right = start) */
  padding-right: 18px;
}
/* ₪ symbol sits in the right corner of the td */
td:has(.crm-cell-currency)::before {
  content: "₪";
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  pointer-events: none;
  line-height: 1;
  z-index: 1;
}
/* Hide ₪ while user is actively editing so it doesn't overlap */
td:has(.crm-cell-currency:focus)::before {
  opacity: 0;
}

.crm-table td:has(.crm-cell:focus) {
  overflow: visible !important;
  max-width: none !important;
  z-index: 10;
  position: relative;
}

.crm-cell:focus {
  background: #ffffff !important;
  outline: 2px solid #3b82f6 !important;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.18);
  border-radius: 6px;
  white-space: pre-wrap;
  overflow: visible;
  text-overflow: clip;
  word-break: break-all;
  z-index: 100;
  position: relative;
  width: max-content;
  min-width: 1100px;
  max-width: 320px;
  padding: 6px 8px;
  margin: -6px -8px;
}

.has-tooltip {
  position: relative;
}

.crm-view .has-tooltip::before,
.crm-view .has-tooltip::after {
  display: none;
}

.calendar-wrap .has-tooltip::before,
.calendar-wrap .has-tooltip::after {
  display: none;
}

.crm-tooltip {
  position: fixed;
  max-width: 320px;
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
  z-index: 12000;
  pointer-events: none;
  direction: rtl;
  text-align: right;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  white-space: pre-wrap;
}

.crm-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.crm-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 6px 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
}

.crm-badge {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-weight: 600;
  font-size: 12px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  line-height: 1;
  direction: ltr;
  unicode-bidi: isolate;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.crm-answer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 2px;
}

.crm-answer-half {
  width: 100%;
  min-width: 0;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 15px;
  font-weight: 700;
  user-select: none;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  border-radius: 7px;
}

.crm-answer-half.yes {
  color: #16a34a;
  background: rgba(34, 197, 94, 0.1);
}

.crm-answer-half.no {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.crm-answer-half:hover {
  filter: brightness(0.97);
}

.crm-answer-half.yes.active {
  background: rgba(34, 197, 94, 0.2);
  color: #166534;
}

.crm-answer-half.no.active {
  background: rgba(239, 68, 68, 0.2);
  color: #991b1b;
}

.crm-answer-half:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.6);
  outline-offset: -2px;
}

.crm-total {
  align-self: center;
  margin: 8px auto 0;
  background: rgba(45, 212, 191, 0.18);
  border: 1px solid rgba(45, 212, 191, 0.5);
  color: #f8fafc;
  padding: 7px 13px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.01em;
}

.finance-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 0;
  overflow: hidden;
}

.finance-header {
  display: grid;
  gap: 12px;
}

.finance-year-tabs,
.finance-month-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.finance-year-tab.active,
.finance-month-tab.active {
  border-color: rgba(34, 197, 94, 0.62);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(21, 128, 61, 0.22));
  box-shadow: 0 0 0 1px rgba(45, 212, 191, 0.22), 0 10px 24px rgba(5, 150, 105, 0.18);
  color: #dcfce7;
}

.finance-year-tab,
.finance-month-tab {
  min-width: 76px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(10, 20, 18, 0.78);
  color: #d1fae5;
  padding: 10px 14px;
  font-weight: 700;
}

.finance-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(52, 211, 153, 0.16);
  background: rgba(8, 20, 16, 0.34);
  padding: 16px;
}

.finance-monthly-layout,
.finance-annual-layout {
  display: grid;
  gap: 18px;
  min-width: 1180px;
}

.finance-stack {
  display: grid;
  gap: 20px;
}

.finance-card {
  border-radius: 18px;
  border: 1px solid rgba(52, 211, 153, 0.18);
  background: linear-gradient(180deg, rgba(9, 19, 16, 0.96), rgba(12, 26, 22, 0.94));
  padding: 14px;
  display: grid;
  gap: 12px;
}

.finance-card-expense {
  border: 1px solid rgba(190, 24, 93, 0.18);
  background: linear-gradient(180deg, rgba(34, 9, 18, 0.96), rgba(42, 12, 20, 0.94));
}

.finance-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.finance-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #ecfdf5;
}

.finance-card-subtitle {
  color: #86efac;
  font-size: 13px;
}

.finance-card-expense .finance-card-subtitle {
  color: #f9a8d4;
}

.finance-table-wrap {
  overflow: visible;
}

.finance-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 1140px;
  font-size: 13px; /* made smaller */
}

.finance-table th,
.finance-table td {
  border-left: 1px solid rgba(255, 255, 255, 0.15); /* faint white line */
  border-bottom: 1px solid rgba(255, 255, 255, 0.15); /* faint white line */
  padding: 6px 8px; /* smaller padding */
  text-align: center;
  vertical-align: middle;
  background: rgba(7, 17, 31, 0.78);
  transition: background 0.1s;
}

.finance-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.08); /* row hover highlight */
}

.finance-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(8, 26, 20, 0.98), rgba(10, 33, 25, 0.96));
  color: #d1fae5;
  white-space: nowrap;
}

.finance-table-expense th {
  background: linear-gradient(180deg, rgba(58, 16, 31, 0.98), rgba(72, 18, 34, 0.96));
  color: #ffe4e6;
}

.finance-table td:first-child,
.finance-table th:first-child {
  border-right: 1px solid rgba(143, 163, 194, 0.12);
  text-align: right;
}

.finance-cell {
  min-height: 24px;
  outline: none;
  white-space: pre-wrap;
  font-size: inherit;
  line-height: 1.45;
}

.finance-cell-select {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(143, 163, 194, 0.18);
  border-radius: 10px;
  background: rgba(7, 17, 31, 0.9);
  color: var(--text);
  font: inherit;
  font-size: inherit;
  padding: 6px 10px;
  outline: none;
}

.finance-cell-search {
  direction: rtl;
}

.finance-cell-select:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.finance-cell[contenteditable="true"]:focus {
  background: rgba(34, 197, 94, 0.12);
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.34);
}

.finance-table td.finance-mark-yellow {
  background: rgba(250, 204, 21, 0.22) !important;
}

.finance-table td.finance-mark-red {
  background: rgba(248, 113, 113, 0.2) !important;
}

.finance-table td.finance-mark-green {
  background: rgba(74, 222, 128, 0.18) !important;
}

.finance-add-row {
  justify-self: end;
}

.finance-add-row.inline {
  margin-top: 8px;
}

.finance-summary-line {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  color: #a7f3d0;
  font-size: 13px;
}

.finance-summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.18);
  color: #ecfdf5;
}

@keyframes highlight-row-pulse {
  0% { background: rgba(59, 130, 246, 0.4); }
  100% { background: rgba(255, 255, 255, 0.05); }
}

.finance-row-highlight td {
  animation: highlight-row-pulse 2s ease-out;
}

.finance-summary-chip strong {
  color: #d1fae5;
  font-weight: 800;
}

.finance-card-expense .finance-summary-chip {
  background: rgba(190, 24, 93, 0.1);
  border-color: rgba(244, 114, 182, 0.16);
  color: #ffe4e6;
}

.finance-card-expense .finance-summary-chip strong {
  color: #fecdd3;
}

.finance-summary-chip-meta {
  opacity: 0.82;
}

.finance-card-head-copy {
  display: grid;
  gap: 4px;
}

.finance-table td.is-row-index,
.finance-table th.is-row-index {
  width: 64px;
  text-align: center;
}

.finance-table td.is-money,
.finance-table th.is-money {
  min-width: 120px;
}

.finance-table td.is-day,
.finance-table th.is-day {
  min-width: 110px;
}

.finance-table-footer-row td {
  background: rgba(3, 10, 21, 0.98);
  font-weight: 800;
  color: #f8fafc;
}

.finance-annual-sheet-card {
  gap: 14px;
}

.finance-annual-sheet .finance-annual-label-col {
  position: sticky;
  right: 0;
  z-index: 3;
  min-width: 260px;
  background: linear-gradient(180deg, rgba(10, 24, 20, 0.995), rgba(11, 28, 23, 0.985));
}

.finance-annual-sheet td.finance-annual-label-col {
  z-index: 1;
  background: rgba(10, 23, 21, 0.98);
  font-weight: 600;
}

.finance-annual-month-name {
  font-size: 14px;
  font-weight: 700;
}

.finance-annual-month-num {
  margin-top: 4px;
  font-size: 12px;
  color: #8dddb7;
}

.finance-annual-summary-row td {
  font-weight: 800;
  text-align: center;
}

.finance-annual-summary-row .finance-annual-label-col {
  text-align: right;
}

.finance-annual-summary-row.is-income-total td {
  background: rgba(22, 101, 52, 0.22);
  color: #d1fae5;
}

.finance-annual-summary-row.is-expense-total td {
  background: rgba(127, 29, 29, 0.28);
  color: #ffe4e6;
}

.finance-annual-summary-row.is-balance-total td {
  background: rgba(15, 23, 42, 0.92);
  color: #f8fafc;
}

.finance-annual-summary-row.is-cumulative-total td {
  background: rgba(9, 20, 44, 0.96);
  color: #93c5fd;
}

@media (max-width: 900px) {
  .finance-scroll {
    padding: 10px;
  }

  .finance-card {
    padding: 10px;
  }
}

/* Support center */
.support-overlay {
  position: fixed;
  inset: 0;
  z-index: 1850;
  background: rgba(6, 12, 24, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.support-overlay.hidden {
  display: none;
}

.support-card {
  width: min(720px, 94vw);
  max-height: 85vh;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.crm-move-card {
  width: min(620px, 92vw);
}

.crm-move-list {
  display: grid;
  gap: 12px;
  max-height: min(52vh, 460px);
  overflow: auto;
}

.crm-move-option {
  width: 100%;
  text-align: right;
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.88);
  color: #e2e8f0;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.crm-move-option:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(16, 31, 64, 0.96);
}

.crm-move-option-title {
  font-size: 18px;
  font-weight: 800;
}

.crm-move-option-meta {
  font-size: 13px;
  color: #94a3b8;
}

.support-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.support-tabs {
  display: flex;
  gap: 8px;
}

.support-tab {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}

.support-tab.active {
  background: rgba(59, 130, 246, 0.28);
  border-color: rgba(59, 130, 246, 0.6);
}

.support-body {
  overscroll-behavior-y: none;
  overflow: auto;
}

.support-pane {
  display: none;
  flex-direction: column;
  gap: 12px;
}

.support-pane.active {
  display: flex;
}

.integrations-card {
  width: min(820px, 95vw);
}

.integrations-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.integrations-grid .is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

.integrations-box {
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 12px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.55);
  display: grid;
  gap: 8px;
}

.mono-line {
  font-family: "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;
  direction: ltr;
  text-align: left;
  color: #cbd5e1;
  word-break: break-all;
}

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

.settings-data-export {
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.45);
  padding: 10px;
  display: grid;
  gap: 10px;
}

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

.drive-config-grid {
  display: grid;
  gap: 10px;
}

.drive-config-grid input {
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(143, 163, 194, 0.24);
  background: rgba(5, 12, 24, 0.75);
  color: var(--text);
  padding: 0 12px;
}

.admin-env-output {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  border-radius: 14px;
  border: 1px solid rgba(245, 158, 11, 0.34);
  background: rgba(5, 12, 24, 0.86);
  color: #f8fafc;
  direction: ltr;
  text-align: left;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.7;
  padding: 12px;
}

.user-data-list {
  display: grid;
  gap: 8px;
}

#admin-users-list {
  max-height: min(48vh, 520px);
  overflow-y: auto;
  padding-left: 4px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
}

#admin-user-search {
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(143, 163, 194, 0.24);
  background: rgba(5, 12, 24, 0.75);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}

#admin-user-search::placeholder {
  color: var(--muted);
}

.user-data-row {
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.45);
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.user-data-row-main {
  display: grid;
  gap: 3px;
}

.member-permissions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 8px;
}

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

.member-role-select {
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(143, 163, 194, 0.24);
  background: rgba(5, 12, 24, 0.7);
  color: var(--text);
  padding: 0 10px;
}

.member-rank-select {
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(143, 163, 194, 0.24);
  background: rgba(5, 12, 24, 0.7);
  color: var(--text);
  padding: 0 10px;
}

.user-data-row-title {
  font-weight: 700;
  color: #e2e8f0;
}

.user-data-row-meta {
  font-size: 12px;
  color: #94a3b8;
}

.user-data-row-actions {
  display: flex;
  gap: 6px;
}

.user-data-row-actions .ghost {
  min-width: 40px;
}

.crm-new-lead-highlight td {
  box-shadow: inset 0 0 0 2px rgba(190, 24, 93, 0.55);
  background: rgba(127, 29, 29, 0.12) !important;
}

.crm-reminder-row td {
  background: rgba(244, 114, 182, 0.12) !important;
  box-shadow: inset 0 0 0 1px rgba(244, 114, 182, 0.28);
}

.crm-reminder-row:hover td {
  background: rgba(244, 114, 182, 0.16) !important;
}

.support-links {
  display: grid;
  gap: 10px;
}

.support-link {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border-radius: 12px;
  padding: 10px 12px;
  text-align: right;
  cursor: pointer;
}

.support-link.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  filter: grayscale(0.5);
}

.license-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 700px at 12% 18%, rgba(30, 64, 175, 0.38), transparent 60%),
    radial-gradient(900px 560px at 88% 75%, rgba(127, 29, 29, 0.36), transparent 62%),
    linear-gradient(135deg, #01040d 0%, #06122a 34%, #090f1f 68%, #17070b 100%);
  background-size: 130% 130%, 130% 130%, 100% 100%;
  animation: brandBgFlow 26s ease-in-out infinite alternate;
  z-index: 5000;
  overflow: hidden;
  padding: 0;
}

.license-overlay.hidden {
  display: none;
}

.license-overlay::before {
  content: "";
  position: fixed;
  inset: -25%;
  pointer-events: none;
  background:
    radial-gradient(780px 420px at 20% 20%, rgba(59, 130, 246, 0.14), transparent 72%),
    radial-gradient(760px 420px at 80% 78%, rgba(220, 38, 38, 0.12), transparent 74%);
  filter: blur(24px);
  animation: brandAuraDrift 34s linear infinite;
  opacity: 0.9;
}

@keyframes brandBgFlow {
  0% {
    background-position: 0% 0%, 100% 100%, 0% 0%;
  }
  100% {
    background-position: 26% 18%, 74% 82%, 0% 0%;
  }
}

@keyframes brandAuraDrift {
  0% {
    transform: translate3d(-3%, -2%, 0) rotate(0deg) scale(1);
  }
  50% {
    transform: translate3d(3%, 2%, 0) rotate(4deg) scale(1.06);
  }
  100% {
    transform: translate3d(-2%, 3%, 0) rotate(0deg) scale(1);
  }
}

.license-card {
  width: min(560px, 92vw);
  border-radius: 20px;
  border: 1px solid rgba(147, 197, 253, 0.32);
  background: linear-gradient(180deg, #0f172a 0%, #131f3a 100%);
  box-shadow: 0 30px 60px rgba(2, 6, 23, 0.6);
  color: #e2e8f0;
  padding: 22px;
  display: grid;
  gap: 12px;
}

.license-tip {
  font-size: 12px;
  color: #cbd5e1;
}

.landing-shell {
  width: min(1180px, 96vw);
  margin: 20px auto;
  padding: 12px 10px 40px;
  display: grid;
  gap: 20px;
}

.landing-topbar {
  position: sticky;
  top: 8px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(147, 197, 253, 0.25);
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(4px);
}

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

.landing-brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.landing-brand-title {
  color: #f8fafc;
  font-weight: 700;
  font-size: 15px;
}

.landing-brand-sub {
  color: #94a3b8;
  font-size: 12px;
}

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

.landing-shell .ghost,
.entry-modal .ghost {
  color: #f8fafc;
  border-color: rgba(203, 213, 225, 0.55);
  background: rgba(15, 23, 42, 0.38);
}

.landing-shell .ghost:hover,
.entry-modal .ghost:hover {
  color: #ffffff;
  border-color: rgba(125, 211, 252, 0.72);
  background: rgba(30, 41, 59, 0.72);
}

.landing-hero,
.landing-section,
.landing-login {
  border-radius: 18px;
  border: 1px solid rgba(147, 197, 253, 0.22);
  background: linear-gradient(170deg, rgba(8, 13, 28, 0.96), rgba(10, 14, 24, 0.9));
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 20px;
  position: relative;
  overflow: hidden;
}

.landing-section {
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 8px 2px;
}

.landing-section::before {
  display: none;
}

.landing-hero::before,
.landing-section::before,
.landing-login::before {
  content: "";
  position: absolute;
  inset: -40% -15%;
  background:
    radial-gradient(420px 200px at 18% 12%, rgba(96, 165, 250, 0.11), transparent 70%),
    radial-gradient(380px 190px at 84% 78%, rgba(248, 113, 113, 0.1), transparent 72%);
  pointer-events: none;
  transform: translateZ(0);
}

.landing-hero h1,
.landing-section h2 {
  margin: 0 0 10px;
  color: #f8fafc;
  letter-spacing: 0.2px;
  text-shadow: 0 2px 18px rgba(30, 64, 175, 0.3);
}

.landing-section h2 {
  font-size: clamp(24px, 2.6vw, 34px);
  margin-bottom: 14px;
}

.landing-hero p,
.landing-section p {
  margin: 0;
  color: #cbd5e1;
}

.landing-hero-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.landing-hero {
  min-height: 240px;
  transform: translateZ(24px);
  border-color: rgba(96, 165, 250, 0.38);
  box-shadow:
    0 24px 60px rgba(2, 6, 23, 0.48),
    0 0 0 1px rgba(96, 165, 250, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.landing-hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.08;
  margin-bottom: 14px;
}

.landing-hero p {
  font-size: clamp(15px, 1.7vw, 19px);
  max-width: 72ch;
  line-height: 1.6;
}

.landing-login {
  display: grid;
  justify-items: center;
  border-color: rgba(148, 163, 184, 0.34);
}

.landing-grid-2,
.landing-grid-3,
.reels-grid {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.landing-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-grid-2 article,
.landing-grid-3 article,
.reels-grid article {
  border-radius: 0;
  border: 0;
  background: transparent;
  padding: 6px 2px;
  color: #e2e8f0;
}

.landing-grid-2 article h3,
.landing-grid-3 article h3 {
  margin: 0 0 10px;
  color: #93c5fd;
  font-size: 22px;
  line-height: 1.2;
}

.landing-grid-2 article p,
.landing-grid-3 article p {
  line-height: 1.9;
  color: #dbe6ff;
}

.landing-grid-2.compare ul {
  margin: 8px 0 0;
  padding-inline-start: 18px;
}

.landing-grid-2.compare li {
  margin: 6px 0;
}

.landing-grid-2.compare article {
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.5), rgba(17, 24, 39, 0.64));
  padding: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(2, 6, 23, 0.24);
}

.media-card .media-placeholder,
.reel-placeholder {
  margin-top: 8px;
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: 12px;
  background:
    linear-gradient(120deg, rgba(30, 64, 175, 0.16), rgba(2, 6, 23, 0.25) 40%, rgba(127, 29, 29, 0.15) 100%),
    rgba(2, 6, 23, 0.35);
  min-height: 130px;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 12px;
  position: relative;
  overflow: hidden;
}

.media-card .media-placeholder::after,
.reel-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.12) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: luxeShimmer 4.8s ease-in-out infinite;
}

@keyframes luxeShimmer {
  0%,
  72% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(130%);
  }
}

.faq-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.faq-list details {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.42);
  padding: 10px 12px;
  color: #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.faq-list summary {
  cursor: pointer;
  color: #f8fafc;
  font-weight: 600;
}

.faq-list p {
  margin-top: 8px;
}

.reels-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.reels-grid h4 {
  margin: 0 0 8px;
  color: #dbeafe;
}

/* Landing revamp */
.landing-shell {
  width: min(1120px, 94vw);
  min-height: 100vh;
  margin: 0 auto;
  padding: 12px 10px;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
}

.landing-topbar {
  position: relative;
  top: auto;
  z-index: 3;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.32);
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(7px);
}

.landing-kicker {
  margin: 0 0 8px;
  color: #93c5fd;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.landing-hero-actions {
  justify-content: center;
}

#landing-login-hero {
  min-width: 220px;
}

#existing-google-row {
  display: none;
}

.landing-hero {
  padding: 28px;
  border-radius: 24px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  background:
    radial-gradient(520px 260px at 12% 8%, rgba(59, 130, 246, 0.22), transparent 65%),
    radial-gradient(440px 220px at 88% 82%, rgba(220, 38, 38, 0.16), transparent 68%),
    linear-gradient(160deg, rgba(6, 11, 24, 0.96), rgba(7, 10, 19, 0.92));
}

.landing-hero + .landing-section {
  margin-top: 18px;
}

.landing-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: center;
}

.landing-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(34px, 4.7vw, 64px);
  line-height: 1.03;
  color: #f8fafc;
  text-wrap: balance;
  text-align: center;
}

.landing-hero p {
  margin: 0;
  color: #d4dff5;
  font-size: clamp(15px, 1.6vw, 20px);
  line-height: 1.75;
  max-width: 62ch;
}

.landing-inline-points {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.landing-inline-points span {
  border: 1px solid rgba(148, 163, 184, 0.38);
  background: rgba(15, 23, 42, 0.45);
  color: #dbeafe;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
}

.landing-hero-visual {
  display: flex;
  justify-content: center;
}

.hero-window {
  width: min(430px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.9), rgba(2, 6, 23, 0.92));
  box-shadow: 0 22px 44px rgba(2, 6, 23, 0.48);
  overflow: hidden;
}

.hero-window-top {
  display: flex;
  gap: 7px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  background: rgba(30, 41, 59, 0.42);
}

.hero-window-top span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.8);
}

.hero-window-body {
  overscroll-behavior-y: none;
  padding: 14px;
  display: grid;
  gap: 14px;
}

.hero-metric {
  border-radius: 12px;
  border: 1px solid rgba(125, 211, 252, 0.35);
  background: rgba(30, 64, 175, 0.15);
  padding: 12px;
  display: grid;
  gap: 4px;
}

.hero-metric small {
  color: #bfdbfe;
}

.hero-metric strong {
  font-size: 28px;
  color: #f8fafc;
}

.hero-bars {
  display: grid;
  gap: 8px;
}

.hero-bars i {
  height: 9px;
  border-radius: 999px;
  display: block;
  width: var(--w);
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

.hero-list {
  display: grid;
  gap: 8px;
}

.hero-list span {
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.45);
  color: #e2e8f0;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13px;
}

.landing-section {
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(170deg, rgba(7, 11, 22, 0.9), rgba(4, 7, 14, 0.84));
  box-shadow: 0 20px 42px rgba(2, 6, 23, 0.28);
  padding: 51px 0;
}

.landing-section h2 {
  margin: 0 0 30px;
  color: #f8fafc;
  font-size: clamp(28px, 2.9vw, 40px);
  line-height: 1.1;
  text-align: center;
}

.landing-section > p {
  color: #d6e1f4;
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 33px;
}

.landing-grid-3,
.landing-grid-2,
.reels-grid {
  margin-top: 42px;
  gap: 14px;
}

.landing-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-card,
.landing-grid-2 article,
.landing-grid-3 article,
.reels-grid article {
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.62), rgba(2, 6, 23, 0.45));
  padding: 16px;
}

.landing-grid-2 article h3,
.landing-grid-3 article h3 {
  margin: 0 0 8px;
  color: #bfdbfe;
  font-size: 20px;
  line-height: 1.3;
}

.landing-grid-2 article p,
.landing-grid-3 article p {
  margin: 0;
  color: #dbeafe;
  line-height: 1.8;
  font-size: 15px;
}

.media-card .media-placeholder,
.reel-placeholder {
  min-height: 150px;
}

.landing-grid-2.compare article {
  padding: 18px;
}

.landing-grid-2.compare ul {
  margin: 8px 0 0;
  padding-inline-start: 18px;
  color: #e2e8f0;
}

.landing-grid-2.compare li {
  margin: 7px 0;
}

.landing-cta-band {
  text-align: center;
  border-color: rgba(96, 165, 250, 0.38);
  background:
    radial-gradient(420px 200px at 50% 12%, rgba(59, 130, 246, 0.22), transparent 70%),
    linear-gradient(165deg, rgba(8, 15, 31, 0.93), rgba(4, 8, 17, 0.9));
}

.landing-cta-band .landing-hero-actions {
  justify-content: center;
}

.faq-list {
  margin-top: 14px;
  gap: 10px;
}

.faq-list details {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.45);
}

.faq-list summary {
  padding: 4px 0;
}

.reels-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1050px) {
  .landing-hero-grid {
    grid-template-columns: 1fr;
  }

  .landing-hero-visual {
    justify-content: stretch;
  }

  .hero-window {
    width: 100%;
  }

  .landing-grid-3,
  .landing-grid-2,
  .reels-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .landing-shell {
    width: min(1220px, 97vw);
    gap: 54px;
  }

  .landing-hero,
  .landing-section {
    padding: 33px 14px;
    border-radius: 16px;
  }

  .landing-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-top-actions {
    width: 100%;
  }

  .landing-top-actions button {
    flex: 1;
  }

  .landing-hero-actions {
    flex-direction: column;
  }

  .landing-hero-actions button {
    width: 100%;
  }

  .landing-grid-3,
  .landing-grid-2,
  .reels-grid {
    grid-template-columns: 1fr;
  }
}

/* Flat landing look: no framed cards/boxes */
.landing-topbar {
  border: 0;
  background: rgba(107, 114, 128, 0.5);
  backdrop-filter: none;
  padding-inline: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}

.landing-top-center {
  justify-self: center;
}

.landing-top-actions {
  justify-self: end;
}

.landing-top-center .lang-toggle {
  width: 84px;
  height: 32px;
  padding: 0 8px;
}

.landing-top-center .lang-toggle .lang-knob {
  width: 34px;
  height: 24px;
  top: 3px;
  right: 4px;
}

.landing-top-center .lang-toggle.en .lang-knob {
  transform: translateX(-38px);
}

.landing-hero {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 18px 0;
}

.landing-hero-visual {
  display: none;
}

.landing-hero-grid {
  grid-template-columns: 1fr;
}

.landing-section {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 12px 0;
}

.landing-card,
.landing-grid-2 article,
.landing-grid-3 article,
.reels-grid article {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 4px 0;
}

.landing-grid-2.compare article {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 4px 0;
}

.faq-list details {
  border: 0;
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 0;
  padding: 10px 0;
}

.media-card .media-placeholder,
.reel-placeholder {
  border: 0;
  background: rgba(15, 23, 42, 0.22);
  border-radius: 10px;
}

.landing-cta-band {
  border: 0;
  background: transparent;
}

/* Bring back frames only where separation is truly needed */
.landing-showcase .landing-grid-2 article {
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.5), rgba(2, 6, 23, 0.34));
  border-radius: 12px;
  padding: 12px;
}

.landing-grid-2.compare article {
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.56), rgba(2, 6, 23, 0.38));
  border-radius: 14px;
  padding: 14px;
}

.reels-grid article {
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.52), rgba(2, 6, 23, 0.36));
  border-radius: 12px;
  padding: 12px;
}

@media (max-width: 700px) {
  .landing-topbar {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .landing-top-actions {
    width: 100%;
    justify-self: stretch;
  }
}

.entry-modal {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
}

body.entry-modal-open .landing-shell > *:not(#entry-modal) {
  filter: blur(7px);
  opacity: 0.55;
  pointer-events: none;
  user-select: none;
}

.entry-modal.hidden {
  display: none;
}

.entry-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(10px);
}

.entry-modal-card {
  position: relative;
  z-index: 1;
  width: min(760px, 94vw);
}

.entry-close {
  position: static;
  color: #f8fafc;
  min-width: 42px;
}

@media (max-width: 980px) {
  .landing-grid-3,
  .landing-grid-2,
  .reels-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .landing-topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-top-actions {
    width: 100%;
    justify-content: stretch;
  }

  .landing-top-actions button {
    flex: 1;
  }

  .landing-grid-3,
  .landing-grid-2,
  .reels-grid {
    grid-template-columns: 1fr;
  }
}

.license-card h2 {
  margin: 0;
  font-size: 28px;
  color: #f8fafc;
}

.license-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.license-card p {
  margin: 0;
  color: #cbd5e1;
}

.license-status {
  min-height: 22px;
  font-size: 14px;
  color: #93c5fd;
}

.license-status.muted {
  color: rgba(226, 232, 240, 0.76);
}

.license-card input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.66);
  color: #f8fafc;
  padding: 12px 14px;
  font-family: inherit;
}

.license-card input::placeholder {
  color: rgba(226, 232, 240, 0.72);
}

.license-card #license-google {
  width: 100%;
}

.license-connect-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 10px;
  align-items: center;
}

.manual-token-toggle {
  width: 100%;
}

.coupon-code-input {
  display: grid;
  gap: 8px;
  position: relative;
}

.coupon-code-hidden-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.coupon-code-input #license-token {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: "Rubik", monospace;
  direction: ltr;
  text-align: left;
}

.coupon-code-boxes {
  display: grid;
  grid-template-columns: repeat(8, minmax(22px, 1fr));
  gap: 6px;
  direction: ltr;
}

.coupon-code-boxes span {
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.48);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: #f8fafc;
  user-select: none;
}

.coupon-code-boxes span.active {
  border-color: #38bdf8;
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.65);
  position: relative;
}

.coupon-code-boxes span.active::after {
  content: "";
  width: 1px;
  height: 16px;
  background: #e2e8f0;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: coupon-caret-blink 1s steps(1, end) infinite;
}

@keyframes coupon-caret-blink {
  50% {
    opacity: 0;
  }
}

.license-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.license-actions button {
  width: 100%;
}

.license-actions-primary {
  margin-top: 10px;
}

.license-actions-primary #existing-user-open {
  grid-column: 1 / -1;
}

.existing-user-panel {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
  display: grid;
  gap: 10px;
}

.existing-user-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.conn-indicator {
  font-size: 24px;
  line-height: 1;
}

.existing-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  overflow: hidden;
}

.existing-progress > span {
  display: block;
  width: 8%;
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #22d3ee);
  transition: width 0.25s ease;
}

.license-card .ghost {
  color: #f8fafc;
  border-color: rgba(148, 163, 184, 0.65);
  background: rgba(15, 23, 42, 0.42);
}

.license-card .ghost:hover {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(125, 211, 252, 0.72);
}

@media (max-width: 760px) {
  .license-connect-row,
  .license-actions {
    grid-template-columns: 1fr;
  }
}

.support-label {
  font-size: 12px;
  color: #cbd5f5;
}

.brief-structure {
  margin-top: 10px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.28);
  padding: 8px 10px;
  display: grid;
  gap: 4px;
}

.brief-structure-title {
  font-size: 11px;
  letter-spacing: 0.6px;
  color: #93c5fd;
}

.brief-structure-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #dbeafe;
}

.support-pane input,
.support-pane select,
.support-pane textarea {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  padding: 8px 10px;
}

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

.support-actions button {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 13px;
  cursor: pointer;
}

.support-actions button.ghost {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(255, 255, 255, 0.25);
}

.support-actions button.primary {
  border: 0;
  color: #ffffff;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.35);
}

.crm-dup-card {
  width: min(520px, 90vw);
}

.crm-dup-card .lead-dup-actions {
  margin-top: 10px;
  gap: 10px;
  justify-content: flex-end;
}

.crm-dup-card .lead-dup-actions .primary {
  color: #ffffff;
}

.crm-dup-card .lead-dup-actions .ghost {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.34);
  color: #f8fafc;
}

.crm-dup-card .lead-dup-actions .ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

.crm-scan-review-card {
  width: min(720px, 92vw);
  max-height: 82vh;
}

.crm-scan-review-list {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.24);
  max-height: 54vh;
  overflow: auto;
  padding: 8px;
  display: grid;
  gap: 8px;
}

.crm-scan-review-item {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 12px;
  padding: 8px 10px;
}

.crm-scan-review-main {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.crm-scan-review-name,
.crm-scan-review-phone,
.crm-scan-review-reason {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #e2e8f0;
  font-size: 13px;
}

.crm-scan-review-phone {
  color: #cbd5e1;
}

.crm-scan-review-reason {
  color: #93c5fd;
  font-size: 12px;
}

.scan-action-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(15, 23, 42, 0.5);
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
}

.scan-action-btn:hover::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  right: 50%;
  transform: translateX(50%);
  background: rgba(2, 6, 23, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #f8fafc;
  font-size: 11px;
  line-height: 1.2;
  padding: 4px 7px;
  border-radius: 8px;
  white-space: nowrap;
  z-index: 2;
  pointer-events: none;
}

.scan-action-btn.plus {
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}

.scan-action-btn.drop {
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.scan-action-btn.skip {
  border-color: rgba(59, 130, 246, 0.45);
  color: #93c5fd;
}

.crm-scan-review-item.done {
  opacity: 0.45;
  filter: saturate(0.75);
}

.crm-empty {
  text-align: center;
  color: #94a3b8;
  padding: 18px 0;
}

.calendar-wrap.hourless {
  padding-left: 0;
}

.hour-rail {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--hour-rail-width);
  display: grid;
  grid-template-rows: repeat(24, var(--hour-height));
  align-items: flex-start;
  justify-items: flex-end;
  padding-top: 0;
  box-sizing: border-box;
}

.hour-line {
  width: 100%;
  height: var(--hour-height);
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-bottom: 0;
}

.hour-rail .hour-label {
  font-size: 12px;
  color: var(--muted);
  padding-right: 4px;
  line-height: 1;
  height: auto;
  display: block;
  position: relative;
  top: -2px;
}

.hidden {
  display: none !important;
}

.ctx-menu {
  position: fixed;
  z-index: 1200;
  min-width: 160px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 16px -6px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 4px;
}

.ctx-menu.hidden {
  display: none !important;
}

.ctx-menu .ctx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  border: none;
  background: transparent;
  color: #334155;
  text-align: right;
  border-radius: 8px;
  transition: all 0.15s ease;
  font-family: inherit;
}

.ctx-menu .ctx-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.ctx-menu .ctx-item.danger {
  color: #ef4444;
}

.ctx-menu .ctx-item.danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

.ctx-menu .ctx-divider {
  height: 1px;
  background: rgba(15, 23, 42, 0.06);
  margin: 4px 0;
}

.ctx-rsvp {
  padding: 8px 10px 4px 10px;
}

.ctx-rsvp-label {
  font-size: 13px;
  color: #0f172a;
  margin-bottom: 6px;
}

.ctx-rsvp-btns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.ctx-rsvp-btns button {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  background: #f8fafc;
  cursor: pointer;
}

.ctx-rsvp-btns button.active {
  border-color: #1d4ed8;
  background: rgba(29, 78, 216, 0.1);
}

.ctx-menu .ctx-item:hover {
  background: #f2f4fa;
}

.ctx-menu .ctx-item.danger {
  color: #dc2626;
}

/* .ctx-menu-finance (the finance right-click menu): finance-sheet.css */

.quick-edit {
  position: fixed;
  z-index: 1250;
  max-width: 420px;
  width: 90vw;
  background: var(--bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px;
}

.quick-edit.hidden {
  display: none !important;
}

.quick-edit .qe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  cursor: move;
  user-select: none;
}

.quick-edit .qe-title {
  font-weight: 700;
}

.quick-edit .qe-header .ghost {
  cursor: pointer;
}

.quick-edit .qe-body {
  overscroll-behavior-y: none;
  display: grid;
  gap: 10px;
}

.quick-edit input,
.quick-edit textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  font-family: inherit;
}

.quick-edit .qe-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-edit .qe-row input {
  flex: 1 1 45%;
  min-width: 150px;
}

.quick-edit .qe-time-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 8px;
}

.quick-edit #qe-start-time,
.quick-edit #qe-end-time {
  direction: ltr;
  text-align: left;
  font-weight: 600;
}

.quick-edit .qe-colors {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(32px, 1fr));
  gap: 8px;
}

.quick-edit .qe-attendees {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 2px 2px;
}

.quick-edit .qe-attendee {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
  font-size: 12px;
}

.quick-edit .qe-attendee-status {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: #334155;
}

.quick-edit .qe-attendee-status.yes {
  background: rgba(34, 197, 94, 0.2);
  color: #15803d;
}

.quick-edit .qe-attendee-status.maybe {
  background: rgba(251, 191, 36, 0.25);
  color: #a16207;
}

.quick-edit .qe-attendee-status.no {
  background: rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}

.quick-edit .qe-color {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
}

.quick-edit .qe-color.active {
  border-color: #1d4ed8;
}

.qe-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}

.qe-weekday {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 0;
  cursor: pointer;
}

.qe-weekday.active {
  background: linear-gradient(135deg, #1d4ed8, #38bdf8);
  border-color: #1d4ed8;
  color: #ffffff;
}

.qe-disabled-fields button {
  opacity: 0.72;
  background: #e2e8f0 !important;
  color: #475569 !important;
  border-color: #cbd5e1 !important;
  cursor: not-allowed !important;
}

.quick-edit input,
.quick-edit textarea,
.quick-edit select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
  padding: 12px 14px;
  font-size: 15px;
  transition: all 0.2s;
  color: var(--text);
}

.quick-edit .blink {
  animation: qe-blink 1s ease-in-out infinite;
}

@keyframes qe-blink {
  0% { border-color: #93c5fd; box-shadow: 0 0 0 rgba(59,130,246,0); }
  50% { border-color: #3b82f6; box-shadow: 0 0 0 4px rgba(59,130,246,0.12); }
  100% { border-color: #93c5fd; box-shadow: 0 0 0 rgba(59,130,246,0); }
}

.quick-edit.view-only input,
.quick-edit.view-only textarea,
.quick-edit.view-only select {
  pointer-events: none;
  background: #f6f8fc;
  color: #0f172a;
}

.quick-edit.view-only button.primary,
.quick-edit.view-only button.ghost {
  display: none;
}

.ctx-menu .color-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 8px;
  border-top: 1px solid var(--border);
}

.ctx-menu .color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  box-sizing: border-box;
}

.ctx-menu .color-swatch.active {
  border-color: #1d4ed8;
}

.ctx-menu .color-swatch.none {
  background: repeating-linear-gradient(
      135deg,
      #f8fafc 0,
      #f8fafc 10px,
      #e2e8f0 10px,
      #e2e8f0 14px
    );
  border: 2px dashed #cbd5e1;
}

.calendar {
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--border);
  min-height: 640px;
  padding: 16px;
  padding-bottom: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  background-image: radial-gradient(1200px 600px at 100% -10%, rgba(59,130,246,0.08), transparent 60%);
  direction: rtl;
  width: 100%;
}

.panel {
  display: none;
}

.panel-overlay-header {
  display: none;
  justify-content: flex-end;
}

.panel-overlay-header .ghost {
  border-color: #cbd2e6;
  color: var(--text);
}

.panel.overlay-mode {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 18px;
  position: fixed;
  right: 0;
  top: 0;
  width: var(--overlay-width);
  max-width: 360px;
  height: 100vh;
  z-index: 900;
  box-shadow: 8px 0 24px rgba(15, 23, 42, 0.18);
  background: linear-gradient(180deg, #0f172a, #111827);
  color: #f5f6fb;
  transform: translateX(calc(var(--overlay-width) + var(--overlay-gap)));
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.2s ease;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
}

.panel.overlay-mode.show {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.panel.overlay-mode .panel-overlay-header {
  display: flex;
}

.panel.overlay-mode .panel-card {
  color: #0f172a;
  max-width: 100%;
  width: 100%;
  word-break: break-word;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.15);
}

.panel.overlay-mode .panel-title,
.panel.overlay-mode .panel-sub,
.panel.overlay-mode .section-title {
  text-align: right;
}

.panel.overlay-mode input,
.panel.overlay-mode select,
.panel.overlay-mode button {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #d7dcea;
  padding: 12px 14px;
  font-size: 15px;
  background: #f9fbff;
}

.panel.overlay-mode .row {
  flex-wrap: wrap;
}

.panel.overlay-mode .row > * {
  flex: 1 1 30%;
  min-width: 90px;
}

.panel.overlay-mode .primary {
  background: linear-gradient(135deg, #1d4ed8, #38bdf8);
  color: white;
  border: none;
  box-shadow: 0 10px 22px rgba(56, 189, 248, 0.35);
}

.panel.overlay-mode .ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.panel.overlay-mode .pill {
  background: #eef3ff;
  border: 1px solid #d7dcea;
  color: #0f172a;
}

.panel.overlay-mode .pill.active {
  background: rgba(29, 78, 216, 0.15);
  border-color: rgba(29, 78, 216, 0.5);
}

.panel-overlay-header {
  display: none;
  justify-content: flex-end;
}

.panel-overlay-header .ghost {
  border-color: #cbd2e6;
  color: var(--text);
}

.panel.panel-overlay {
  position: sticky;
  top: 0;
  left: 0;
  width: 340px;
  height: 100vh;
  z-index: 900;
  box-shadow: 8px 0 24px rgba(15, 23, 42, 0.18);
  transform: translateX(-380px);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.panel.panel-overlay.show {
  transform: translateX(0);
}

.panel.panel-overlay .panel-overlay-header {
  display: flex;
}

.panel .panel-title {
  font-weight: 700;
}

.panel-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: grid;
  gap: 10px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.panel-title {
  font-weight: 700;
}

/* Onboarding overlay */
.onboarding {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 40%), rgba(6, 12, 24, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.onboarding.hidden {
  display: none;
}

.onboarding-card {
  background: #0f172a;
  color: #e2e8f0;
  width: min(520px, 92vw);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.onb-progress {
  text-align: center;
  color: #a5b4fc;
  font-weight: 500;
  margin-bottom: 10px;
}

.onb-title {
  text-align: center;
  margin: 0 0 8px 0;
  color: #f8fafc;
}

.onb-sub {
  text-align: center;
  margin: 0 0 16px 0;
  color: #cbd5e1;
}

.onb-body {
  overscroll-behavior-y: none;
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.onb-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  transition: border 0.2s, background 0.2s;
}

.onb-card.active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #334155;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e2e8f0;
  transition: transform 0.2s, background 0.2s;
}

.toggle.on {
  background: #38bdf8;
}

.toggle.on::after {
  transform: translateX(-18px);
  background: #0f172a;
}

.onb-actions {
  display: grid;
  gap: 10px;
}

.onboarding-card .ghost {
  color: #f8fafc;
  border-color: rgba(203, 213, 225, 0.5);
  background: rgba(15, 23, 42, 0.35);
}

.onboarding-card .ghost:hover {
  background: rgba(30, 41, 59, 0.65);
}

.onboarding-card .primary:disabled,
#onb-next:disabled {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.88), rgba(100, 116, 139, 0.78));
  border-color: rgba(148, 163, 184, 0.2);
  color: rgba(226, 232, 240, 0.78);
  cursor: not-allowed !important;
  box-shadow: none;
  opacity: 0.86;
}

/* Settings overlay */
.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 12, 24, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1800;
}

.settings-overlay.hidden {
  display: none;
}

/* Trash overlay */
.trash-overlay {
  position: fixed;
  inset: 0;
  z-index: 1800;
  background: rgba(6, 12, 24, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.trash-overlay.hidden {
  display: none;
}

.trash-card {
  width: min(640px, 92vw);
  max-height: 80vh;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.trash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.trash-sub {
  font-size: 12px;
  color: #94a3b8;
}

.trash-search input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.trash-list {
  overflow: auto;
  display: grid;
  gap: 8px;
}

.trash-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.06);
}

.trash-main {
  display: grid;
  gap: 4px;
}

.trash-title {
  font-weight: 600;
}

.trash-meta {
  font-size: 12px;
  color: #94a3b8;
}

.trash-restore {
  border: 0;
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.trash-restore:hover {
  background: rgba(59, 130, 246, 0.28);
}

.settings-card {
  background: #0f172a;
  color: #e2e8f0;
  width: min(760px, 94vw);
  max-height: min(88vh, 960px);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.settings-card .ghost,
.support-card .ghost,
.trash-card .ghost {
  color: #e2e8f0;
  border: 1px solid rgba(203, 213, 225, 0.45);
  background: rgba(255, 255, 255, 0.08);
}

.settings-card .ghost:hover,
.support-card .ghost:hover,
.trash-card .ghost:hover {
  background: rgba(255, 255, 255, 0.16);
}

.settings-card .icon-btn,
.support-card .icon-btn,
.trash-card .icon-btn {
  color: #f8fafc;
  border-color: rgba(203, 213, 225, 0.35);
  background: rgba(255, 255, 255, 0.08);
}

.settings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex: 0 0 auto;
}

.settings-title-wrap {
  display: grid;
  gap: 4px;
}

.settings-plan-subtitle {
  font-size: 12px;
  color: #8fb4ff;
  font-weight: 600;
}

.settings-content section {
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 12px;
}

.settings-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding-left: 2px;
}

.settings-layout {
  display: flex;
  flex-direction: row;
  gap: 18px;
  min-height: 420px;
  min-width: 0;
}

.settings-nav {
  width: 190px;
  display: grid;
  gap: 8px;
  align-content: start;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding-right: 12px;
}

.settings-tab-btn {
  border: 1px solid rgba(148, 163, 184, 0.34);
  background: rgba(15, 23, 42, 0.45);
  color: #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: right;
  cursor: pointer;
  font-weight: 600;
}

.settings-tab-btn.active {
  border-color: rgba(59, 130, 246, 0.8);
  background: rgba(37, 99, 235, 0.3);
}

.settings-panes {
  flex: 1;
  min-width: 0;
}

.settings-panes section:last-child {
  margin-bottom: 0;
}

.settings-panes section.hidden {
  display: none;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0;
}

.settings-row label {
  font-size: 12px;
  color: #cbd5f5;
}

.settings-row select {
  width: 180px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  padding: 6px 8px;
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
  color: #cbd5e1;
}

.lang-select {
  min-width: 170px;
  max-width: 260px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.75);
  color: #e2e8f0;
  padding: 8px 10px;
  font-weight: 600;
}

.landing-top-center .lang-select {
  min-width: 190px;
}

.payment-summary {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.42);
}

.payment-form {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(100, 116, 139, 0.25);
  display: grid;
  gap: 10px;
}

.payment-form.hidden {
  display: none;
}

.payment-input-row {
  display: grid;
  gap: 6px;
}

.payment-input-row label {
  color: #cbd5e1;
  font-size: 12px;
}

.payment-input-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.payment-input-wrap input {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.7);
  color: #f8fafc;
  padding: 10px 12px;
}

.payment-input-wrap input.invalid {
  border-color: rgba(248, 113, 113, 0.95);
  box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.2);
}

.payment-input-wrap input:read-only {
  opacity: 0.8;
}

.payment-edit-field {
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.65);
  color: #f8fafc;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

.payment-error {
  color: #fecaca;
  font-size: 12px;
  font-weight: 600;
}

.payment-error.hidden {
  display: none;
}

.payment-field-error {
  color: #fecaca;
  font-size: 12px;
  font-weight: 600;
  min-height: 16px;
}

.payment-field-error.hidden {
  display: none;
}

.payment-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.billing-cancel-note {
  margin-top: 8px;
  opacity: 0.7;
  font-size: 12px;
}

.billing-cancel-note summary {
  cursor: pointer;
  color: rgba(226, 232, 240, 0.78);
  list-style: none;
}

.billing-cancel-note summary::-webkit-details-marker {
  display: none;
}

.billing-cancel-note p {
  margin: 8px 0 0;
  color: rgba(203, 213, 225, 0.86);
  line-height: 1.5;
}

/* Tour overlay */
.tour {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tour.hidden {
  display: none;
}

.tour-mask {
  position: absolute;
  inset: 0;
  background: rgba(6, 12, 24, 0.65);
  backdrop-filter: blur(4px);
}

.tour-card {
  position: relative;
  background: #0f172a;
  color: #e2e8f0;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 280px;
  max-width: 320px;
  text-align: center;
  z-index: 1;
}

.tour-card .ghost {
  color: #f8fafc;
  border-color: rgba(203, 213, 225, 0.5);
  background: rgba(15, 23, 42, 0.35);
}

.tour-card .ghost:hover {
  background: rgba(30, 41, 59, 0.65);
}

.tour-step {
  color: #a5b4fc;
  font-weight: 500;
  margin-bottom: 6px;
}

.tour-text {
  margin: 0 0 12px 0;
}

.tour-title {
  margin: 0 0 8px 0;
  color: #f8fafc;
  font-size: 18px;
  font-weight: 700;
}

.tour-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.tour-highlight {
  position: relative;
  z-index: 2200 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.6);
  border-radius: 10px;
}

/* Recurring dialog */
.recurring {
  position: fixed;
  inset: 0;
  background: rgba(6, 12, 24, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2200;
}

.recurring.hidden {
  display: none;
}

.recurring-card {
  background: #ffffff;
  color: #0f172a;
  padding: 20px;
  border-radius: 14px;
  min-width: 300px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  display: grid;
  gap: 10px;
}

.recurring-card label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  font-size: 18px;
  padding: 6px 2px;
  cursor: pointer;
  user-select: none;
}

.recurring-card input[type="radio"] {
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.recurring-title {
  font-weight: 700;
  text-align: center;
}

.recurring-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}

.recurring-actions button {
  min-width: 108px;
  min-height: 54px;
  font-size: 18px;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.recurring-card .primary {
  color: #ffffff;
}

.recurring-card .ghost {
  color: #0f172a;
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.55);
}

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

input[type="text"] {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.row {
  display: flex;
  gap: 8px;
}

.row input,
.row button,
.row select {
  flex: 1;
}

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

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.day-cell {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  min-height: 90px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.day-cell.today {
  border: 2px solid #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12);
}

.day-cell .date {
  font-size: 12px;
  color: var(--muted);
  background: rgba(15, 23, 42, 0.06);
  padding: 2px 6px;
  border-radius: 8px;
  display: inline-flex;
}

.event {
  background: var(--accent-soft);
  color: inherit;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.2;
  word-break: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.week-wrapper {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  position: relative;
  z-index: 0;
  padding-bottom: 6px;
  box-sizing: border-box;
}

.week-edge-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18px;
  border: 2px dashed rgba(168, 85, 247, 0.55);
  background: rgba(196, 181, 253, 0.2);
  border-radius: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 30;
}

.week-edge-zone.week-edge-next {
  left: -2px;
}

.week-edge-zone.week-edge-prev {
  right: -2px;
}

.week-wrapper.dragging-event .week-edge-zone {
  opacity: 0.9;
  pointer-events: auto;
}

.week-edge-zone.active {
  opacity: 1;
  transform: scaleX(1.05);
  box-shadow: 0 0 0 2px rgba(196, 181, 253, 0.28), 0 8px 20px rgba(76, 29, 149, 0.25);
}

.week-edge-zone.holding {
  animation: weekEdgeHoldPulse 0.9s ease-in-out infinite alternate;
}

@keyframes weekEdgeHoldPulse {
  0% {
    box-shadow: 0 0 0 2px rgba(196, 181, 253, 0.24), 0 6px 14px rgba(76, 29, 149, 0.18);
  }
  100% {
    box-shadow: 0 0 0 3px rgba(196, 181, 253, 0.4), 0 10px 24px rgba(76, 29, 149, 0.32);
  }
}

.week-wrapper.day-mode {
  grid-template-columns: 1fr;
}

.now-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #dc2626;
  box-shadow:
    0 0 12px rgba(220, 38, 38, 0.35),
    0 6px 16px rgba(0, 0, 0, 0.16);
  pointer-events: none;
  z-index: 2147483000 !important;
}

.now-line.hidden {
  display: none;
}

.now-line-badge {
  position: absolute;
  top: 50%;
  right: -30px;
  left: auto;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  padding: 1px 5px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.16),
    0 3px 8px rgba(220, 38, 38, 0.3);
}

.day-column {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  display: grid;
  grid-template-rows: 36px 1fr;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  position: relative;
  z-index: 1;
}

.day-column.today {
  border: 2px solid #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12);
  overflow: hidden;
}

.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.06);
}

.time-grid {
  position: relative;
  height: calc(var(--hour-height) * 24 + 8px);
  background: #fff;
  box-sizing: border-box;
  padding-bottom: 8px;
}

.time-grid::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(100, 116, 139, 0.25) 0px,
    rgba(100, 116, 139, 0.25) 1px,
    transparent 1px,
    transparent var(--hour-height)
  );
  opacity: 0.35;
}

.event-block {
  position: absolute;
  border-radius: 4px;
  padding: 7px 8px 6px;
  font-size: 12px;
  line-height: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 2px;
  color: #0f172a;
  background: #e8efff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  border-right: 3px solid rgba(15, 23, 42, 0.12);
  cursor: grab;
  min-width: 48px;
  direction: rtl;
  text-shadow: none;
}

.event-block.assistant-flagged {
  outline: 2px solid rgba(244, 63, 94, 0.95);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.2), 0 12px 24px rgba(15, 23, 42, 0.26);
  animation: assistantFlagPulse 1100ms ease-in-out 4;
}

.event-block.opportunity-glow {
  box-shadow: 0 0 0 1px rgba(253, 224, 71, 0.85), 0 0 20px rgba(234, 179, 8, 0.32), 0 12px 24px rgba(15, 23, 42, 0.2);
}

.event-block.action-feedback {
  animation: actionFeedbackPulse 520ms ease;
}

@keyframes assistantFlagPulse {
  0%, 100% {
    transform: translateZ(0) scale(1);
    filter: brightness(1);
  }
  50% {
    transform: translateZ(0) scale(1.01);
    filter: brightness(1.08);
  }
}

@keyframes actionFeedbackPulse {
  0% {
    transform: scale(0.985);
    filter: saturate(0.88);
  }
  55% {
    transform: scale(1.018);
    filter: saturate(1.14);
  }
  100% {
    transform: scale(1);
    filter: saturate(1);
  }
}

.event-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0) 42%);
  pointer-events: none;
  border-radius: inherit;
}

.event-block:hover {
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.event-block.auto-moved {
  opacity: 0.6;
}

.event-block .auto-tag {
  font-size: 11px;
  opacity: 0.85;
  margin-bottom: 2px;
}

.event-block .event-title {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--title-lines, 1);
  line-height: 16px;
  font-size: 12px;
  font-weight: 500;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  text-overflow: ellipsis;
  text-align: right;
  color: inherit;
}

.event-block .event-time {
  flex: 0 0 auto;
  margin-top: auto;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: ltr;
  text-align: left;
  opacity: 0.9;
  color: inherit;
}

.event-block.short .event-title,
.event-block.medium .event-title {
  -webkit-line-clamp: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 15px;
  margin-top: 0;
}

.event-block.medium {
  padding: 6px 8px 5px;
  gap: 2px;
}

.event-block.long {
  padding-top: 8px;
}

.event-block.short {
  padding: 5px 7px 4px;
  gap: 1px;
}

.event-block.tiny {
  padding: 0 6px 0;
  gap: 0px;
}

.event-block.tiny .event-title {
  margin-top: -1px;
  line-height: 13px;
}

.event-block.tiny .event-time {
  margin-top: 2px;
}

.event-block .event-time.hidden {
  display: none;
}

.event-block.medium .event-time {
  margin-top: auto;
  font-size: 11px;
  line-height: 13px;
  opacity: 0.92;
}

.event-block.long .event-title {
  -webkit-line-clamp: 3;
}

.event-block.tiny .event-title {
  -webkit-line-clamp: 1;
  white-space: nowrap;
}

.event-block.tiny .event-time {
  display: none;
}

.event-block .ghost-actions {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}

.ghost-actions button {
  flex: 1;
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 8px;
  padding: 2px 4px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  font-size: 11px;
}

.event-check {
  margin-left: 6px;
}

.event-block.dragging {
  opacity: 0.58;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.18);
}

.event-block.selected {
  outline: 3px solid #d4af37 !important;
  outline-offset: -1px;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.45) !important;
  z-index: 100 !important;
}

.lasso-selection-box {
  position: fixed;
  border: 2px dashed #0f3f8f;
  background: rgba(15, 63, 143, 0.15);
  pointer-events: none;
  z-index: 999999;
  border-radius: 4px;
}

.event-rsvp-badge {
  position: absolute;
  top: 4px;
  left: 6px;
  width: 16px;
  height: 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.4);
  color: inherit;
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}

.event-block .resize-handle {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 2px;
  height: 8px;
  cursor: ns-resize;
  opacity: 0.35;
  background: transparent;
}

.event-block .resize-handle:hover {
  opacity: 0.65;
}

.event-block.all-day {
  position: static;
  margin: 6px;
  background: #f3f4f6;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: none;
}

.event-block.all-day.span-mid,
.event-block.all-day.span-cont {
  border-radius: 0;
}

.event-block.all-day.span-start.span-cont {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.event-block.all-day.span-mid.span-cont {
  margin-right: -4px;
  margin-left: -4px;
}

.event-block.all-day.span-mid.span-end {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-right: -4px;
}

.event-block.all-day.span-start.span-end {
  border-radius: 10px;
}

.day-column .all-day-list {
  padding: 6px;
  display: grid;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}

.drag-preview {
  position: absolute;
  left: 6px;
  right: 6px;
  border: 2px dashed rgba(59, 130, 246, 0.6);
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.08);
  pointer-events: none;
  z-index: 5;
}

.event-block.draft-block {
  border: 2px dashed rgba(59, 130, 246, 0.6);
  opacity: 0.75;
}

.lead-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 12px;
  background: rgba(15, 23, 42, 0.2);
  border-radius: 6px;
  padding: 2px 4px;
  line-height: 1;
}

.lead-actions {
  position: absolute;
  bottom: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
  opacity: 0.85;
}

.lead-actions button {
  border: 0;
  background: rgba(15, 23, 42, 0.16);
  color: inherit;
  border-radius: 6px;
  padding: 2px 4px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
}

.lead-actions button:hover {
  background: rgba(15, 23, 42, 0.28);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translate(-50%, 12px);
  z-index: 1900;
  background: #0f172a;
  color: #e2e8f0;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.35);
  display: inline-flex;
  gap: 12px;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

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

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.toast-undo {
  background: transparent;
  border: 0;
  color: #3b82f6;
  cursor: pointer;
  font-weight: 500;
  padding: 0;
  text-decoration: none;
}

.toast-undo:hover {
  text-decoration: underline;
}

.billing-alert {
  position: fixed;
  left: 18px;
  bottom: 18px;
  z-index: 1950;
  min-width: 320px;
  max-width: min(92vw, 460px);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(248, 113, 113, 0.6);
  background: linear-gradient(165deg, rgba(92, 16, 16, 0.96), rgba(60, 8, 8, 0.96));
  color: #fff;
  box-shadow: 0 14px 28px rgba(34, 6, 6, 0.48);
  display: grid;
  gap: 4px;
}

.billing-alert.hidden {
  display: none;
}

.billing-alert-line {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.billing-alert-mark {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
  border-radius: 7px;
  padding: 1px 6px;
}

.billing-alert-action {
  justify-self: start;
  margin-top: 4px;
  border: 1px solid rgba(254, 202, 202, 0.8);
  background: rgba(127, 29, 29, 0.65);
  color: #fff;
  border-radius: 9px;
  padding: 7px 12px;
  font-weight: 700;
  cursor: pointer;
}

.billing-alert-action:hover {
  background: rgba(153, 27, 27, 0.85);
}

.assistant-action-confirm {
  position: fixed;
  z-index: 2200;
  min-width: 320px;
  max-width: min(92vw, 420px);
  background: linear-gradient(180deg, rgba(7, 21, 52, 0.98), rgba(12, 26, 64, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.5);
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(2, 8, 28, 0.55);
  padding: 12px 12px 10px;
  display: grid;
  gap: 8px;
}

.assistant-action-title {
  font-weight: 800;
  color: #e2e8f0;
  font-size: 15px;
}

.assistant-action-text {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.45;
}

.assistant-action-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.assistant-action-btn {
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.42);
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
  padding: 6px 14px;
  cursor: pointer;
  font-weight: 700;
}

.assistant-action-btn.yes {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(22, 101, 52, 0.45);
}

.assistant-panel {
  position: fixed;
  top: 0;
  right: var(--sidebar-width);
  width: min(420px, calc(100vw - var(--sidebar-width) - 12px));
  min-width: 340px;
  height: 100vh;
  z-index: 1800;
  padding: 10px 10px 10px 0;
  background: rgba(15, 23, 42, 0.32);
  backdrop-filter: blur(3px);
}

.assistant-panel.hidden {
  display: none;
}

.assistant-card {
  height: 100%;
  background: linear-gradient(180deg, #0f172a 0%, #101a35 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  box-shadow: 0 24px 40px rgba(2, 6, 23, 0.5);
  padding: 10px;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto auto;
  gap: 6px;
  color: #e2e8f0;
}

.assistant-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.assistant-header h2 {
  margin: 0;
  font-size: 17px;
  color: #fff;
}

#assistant-close {
  color: #ffffff;
  border-color: rgba(191, 219, 254, 0.7);
  background: rgba(15, 23, 42, 0.45);
  font-weight: 700;
}

#assistant-close:hover {
  background: rgba(59, 130, 246, 0.28);
  color: #ffffff;
}

.assistant-quick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(34px, auto);
  align-content: start;
  gap: 6px;
}

.assistant-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 2px;
}

.assistant-kpi {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  padding: 5px 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 38px;
}

.assistant-kpi .kpi-label {
  font-size: 9px;
  color: #94a3b8;
}

.assistant-kpi .kpi-value {
  font-size: 12px;
  line-height: 1.1;
  font-weight: 600;
  color: #f8fafc;
}

@media (max-width: 1280px) {
  .assistant-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.assistant-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(147, 197, 253, 0.4);
  background: rgba(30, 58, 138, 0.45);
  color: #dbeafe;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  padding: 7px 10px;
  min-height: 34px;
  max-height: 38px;
  width: 100%;
  max-width: 100%;
  aspect-ratio: auto !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.assistant-chip:hover {
  background: rgba(59, 130, 246, 0.32);
}

.addon-disabled {
  opacity: 0.55;
  filter: saturate(0.35);
  cursor: not-allowed !important;
  pointer-events: none !important;
  user-select: none;
  border-color: rgba(148, 163, 184, 0.35) !important;
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.45), rgba(51, 65, 85, 0.55)) !important;
}

.addon-disabled .pill-icon,
.addon-disabled .pill-text {
  color: rgba(226, 232, 240, 0.8) !important;
}

.assistant-thread {
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.38);
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.assistant-msg {
  max-width: 92%;
  border-radius: 12px;
  padding: 7px 9px;
  font-size: 12px;
  line-height: 1.35;
}

.assistant-msg.user {
  align-self: flex-end;
  background: rgba(56, 189, 248, 0.2);
  border: 1px solid rgba(125, 211, 252, 0.45);
  color: #e0f2fe;
}

.assistant-msg.bot {
  align-self: flex-start;
  background: rgba(51, 65, 85, 0.45);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: #e5e7eb;
}

.assistant-msg.bot.insight {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.2) inset;
}

.assistant-proposal-preview {
  opacity: 0.76;
  outline: 2px dashed rgba(125, 211, 252, 0.95);
  animation: proposalBlink 950ms ease-in-out infinite;
  z-index: 9800 !important;
  pointer-events: none;
}

@keyframes proposalBlink {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.18);
  }
}

.proposal-review {
  position: fixed;
  z-index: 12050;
  width: min(360px, 92vw);
  background: rgba(15, 23, 42, 0.96);
  color: #e2e8f0;
  border: 1px solid rgba(125, 211, 252, 0.45);
  box-shadow: 0 18px 44px rgba(2, 6, 23, 0.4);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.proposal-review.simulate-mode {
  border-color: rgba(244, 114, 182, 0.55);
  box-shadow: 0 16px 36px rgba(190, 24, 93, 0.35);
}

.proposal-review.hidden {
  display: none;
}

.proposal-review-title {
  font-size: 14px;
  font-weight: 700;
}

.proposal-review-text {
  font-size: 13px;
  line-height: 1.45;
  color: #cbd5e1;
}

.proposal-review-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

body.assistant-interrupt::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.22);
  pointer-events: none;
  z-index: 1100;
  animation: assistantInterruptFade 1400ms ease forwards;
}

@keyframes assistantInterruptFade {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.assistant-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 46px;
}

.assistant-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(226, 232, 240, 0.9);
  animation: assistantTypingBounce 1s infinite ease-in-out;
}

.assistant-typing span:nth-child(2) {
  animation-delay: 0.12s;
}

.assistant-typing span:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes assistantTypingBounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

.assistant-actions {
  display: flex;
  gap: 10px;
}

.assistant-actions.hidden {
  display: none;
}

.assistant-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.assistant-compose input {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.assistant-compose input::placeholder {
  color: rgba(226, 232, 240, 0.7);
}

.lang-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  width: 96px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(203, 213, 225, 0.45);
  background: rgba(255, 255, 255, 0.08);
  padding: 0 10px;
  cursor: pointer;
}

.lang-toggle .lang-opt {
  position: relative;
  z-index: 2;
  font-size: 12px;
  font-weight: 600;
  color: #e2e8f0;
}

.lang-toggle .lang-knob {
  position: absolute;
  top: 3px;
  right: 4px;
  width: 42px;
  height: 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, #16a34a, #22c55e);
  box-shadow: 0 6px 16px rgba(34, 197, 94, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.lang-toggle.en .lang-knob {
  transform: translateX(-46px);
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.lang-transition {
  position: fixed;
  inset: 0;
  background: rgba(76, 29, 149, 0.85);
  display: grid;
  place-items: center;
  z-index: 2600;
  opacity: 0;
  transition: opacity 0.22s ease;
  pointer-events: none;
}

.lang-transition.show {
  opacity: 1;
}

.lang-transition-label {
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

body.lang-en .calendar,
body.lang-en .calendar-wrap,
body.lang-en .main,
body.lang-en .quick-edit,
body.lang-en .settings-card,
body.lang-en .support-card,
body.lang-en .assistant-card {
  direction: ltr;
}

body.lang-en .event-block .event-title {
  text-align: left;
}

body.lang-en .event-block .event-time {
  text-align: right;
  direction: ltr;
}

body.lang-en .settings-layout {
  flex-direction: row-reverse;
}

body.lang-en .settings-nav {
  border-right: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding-right: 0;
  padding-left: 12px;
}

body.lang-en .settings-tab-btn {
  text-align: left;
}

@media (max-width: 900px) {
  .settings-card {
    width: min(700px, 96vw);
    max-height: 92vh;
    padding: 18px;
    border-radius: 18px;
  }

  .settings-layout {
    flex-direction: column !important;
    min-height: 0;
  }

  .settings-nav {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 0 !important;
    padding: 0 !important;
    gap: 10px;
  }

  .settings-tab-btn {
    text-align: center !important;
    min-height: 44px;
    padding: 10px 8px;
    font-size: 14px;
  }

  .settings-row {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-row label,
  .settings-row select,
  .settings-row input,
  .drive-config-grid input {
    width: 100%;
  }

  .settings-content {
    padding-left: 0;
  }

  .payment-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .settings-card {
    width: min(880px, 92vw);
    max-height: 88vh;
    padding: 20px;
  }

  .settings-layout {
    gap: 14px;
  }

  .settings-nav {
    width: 170px;
    padding-right: 10px;
  }

  .settings-tab-btn {
    padding: 9px 10px;
    font-size: 14px;
  }

  .user-data-row {
    grid-template-columns: 1fr;
  }

  .user-data-row-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

.lux-debug-console {
  position: fixed;
  left: 14px;
  bottom: 14px;
  width: min(560px, 42vw);
  max-height: 36vh;
  z-index: 999999;
  border-radius: 14px;
  border: 1px solid rgba(255, 120, 120, 0.45);
  background: linear-gradient(180deg, rgba(72, 8, 8, 0.95), rgba(35, 5, 5, 0.95));
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(8px);
  color: #fff;
  overflow: hidden;
}

.lux-debug-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(130, 18, 18, 0.42);
  font-size: 12px;
  letter-spacing: 0.4px;
}

#lux-debug-clear {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 9px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.lux-debug-list {
  padding: 8px 10px;
  overflow: auto;
  max-height: calc(36vh - 40px);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  direction: ltr;
  text-align: left;
}

.lux-debug-line {
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
  padding: 5px 0;
}

@media (max-width: 900px) {
  .lux-debug-console {
    width: calc(100vw - 20px);
    left: 10px;
    right: 10px;
    bottom: 10px;
    max-height: 32vh;
  }
}

.price-old {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  opacity: 0.75;
  margin-inline: 6px 4px;
  font-size: 0.84em;
}

.price-alpha {
  display: inline-block;
  margin-inline: 6px 4px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
  font-size: 0.72em;
  font-weight: 800;
  letter-spacing: 0.03em;
  vertical-align: middle;
}

.price-new {
  font-weight: 800;
  color: #c7ffdb;
  text-shadow: 0 0 10px rgba(43, 255, 138, 0.24);
  margin-inline-start: 4px;
}

.mobile-nav-backdrop,
.mobile-nav-drawer,
.mobile-nav-dock {
  display: none !important;
}

@media (max-width: 1050px) {
  :root {
    --hour-height: 44px;
    --hour-rail-width: 54px;
    --sidebar-width: 100vw;
  }

  body {
  overscroll-behavior-y: none;
    overflow: hidden;
  }

  .app {
    display: block;
    min-height: 100dvh;
  }

  body.overlay-open .main {
    margin-right: 0;
  }

  .sidebar {
    position: fixed;
    inset: auto 0 0 0;
    top: auto;
    height: auto;
    max-height: 44dvh;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.34);
    z-index: 80;
    gap: 12px;
  }

  .brand {
    gap: 8px;
  }

  .brand-main {
    align-items: center;
    gap: 10px;
  }

  .brand-title {
    font-size: 13px;
  }

  .brand-sub {
    font-size: 11px;
  }

  .sidebar-section {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .sidebar-section::-webkit-scrollbar {
    display: none;
  }

  .section-title {
    flex: 0 0 auto;
    min-width: 1100px;
    align-self: center;
    margin-inline-start: 2px;
  }

  .calendar-sidebar-views {
    flex: 0 0 auto;
    display: flex;
    gap: 6px;
    margin: 0;
  }

  .pill,
  .calendar-sidebar-views .pill,
  .calendar-subview-pill {
    flex: 0 0 auto;
    min-width: 1100px;
  }

  .auth-box {
    min-width: 260px;
    flex: 0 0 auto;
  }

  .main {
    height: 100dvh;
    padding: calc(14px + env(safe-area-inset-top)) 12px calc(240px + env(safe-area-inset-bottom));
    overflow: auto;
  }

  .workspace-title,
  .page-title {
    font-size: 18px;
  }

  .landing-shell,
  .landing-hero,
  .landing-hero-actions,
  #landing-login-hero {
    position: relative;
    z-index: 5;
  }

  #landing-login-hero {
    min-height: 54px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  }

  .workspace-subtitle,
  .page-sub {
    font-size: 12px;
  }

  .topbar {
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .top-actions.center-actions {
    position: static;
    transform: none;
    width: 100%;
    justify-content: flex-start;
  }

  .feed-layout {
    grid-template-columns: 1fr;
  }

  .training-preview-grid {
    grid-template-columns: 1fr;
  }

  .internal-feed-composer {
    gap: 8px;
  }

  /* Mobile composer shell: flex row — [+] on left, [textarea] on right */
  .internal-feed-composer-shell {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
  }

  /* Show the + button wrapper on mobile */
  .composer-mobile-plus-wrap {
    display: flex;
    flex-shrink: 0;
    order: 2; /* left side in RTL = order 2 (after textarea) */
  }

  /* Textarea fills the remaining space */
  .internal-feed-composer-shell textarea {
    flex: 1;
    min-width: 0;
    min-height: 42px;
    max-height: 160px;
    order: 1;
  }

  /* Hide desktop buttons on mobile */
  .composer-desktop-btn {
    display: none !important;
  }

  .crm-header,
  .crm-actions,
  .crm-quick-add,
  .finance-header,
  .settings-data-actions,
  .member-permissions-grid,
  .teleprompter-row,
  .teleprompter-actions {
    grid-template-columns: 1fr;
    flex-wrap: wrap;
  }

  .crm-table-wrap {
    overflow: hidden !important;
  }

  .crm-table-scroll,
  .finance-scroll {
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .crm-search-shell {
    width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
  }

  .crm-table-wrap {
    overflow: hidden !important;
    padding: 8px !important;
  }

  .crm-table {
    min-width: 900px !important;
    font-size: 11px !important;
  }

  .crm-table th,
  .crm-table td {
    padding: 6px 4px !important;
  }

  .crm-select {
    font-size: 10px !important;
    padding: 3px 4px !important;
    border-radius: 6px !important;
  }

  .crm-badge {
    font-size: 9px !important;
    padding: 1px 4px !important;
  }

  /* Finance Compact Mobile Styling */
  .finance-scroll {
    padding: 8px !important;
  }

  .finance-table {
    min-width: 780px !important;
    font-size: 11px !important;
  }

  .finance-table th,
  .finance-table td {
    padding: 6px 5px !important;
  }

  .finance-cell {
    font-size: 11px !important;
    line-height: 1.3 !important;
  }

  .finance-cell-select {
    font-size: 10px !important;
    min-height: 24px !important;
    height: 24px !important;
    padding: 2px 4px !important;
    border-radius: 6px !important;
  }

  .finance-sheet {
    min-width: 780px !important;
  }

  .calendar-wrap {
    min-width: 0;
    overflow: auto;
  }

  .calendar {
    min-width: 860px;
  }

  .settings-overlay {
    inset: 0;
    padding: 0;
  }

  .settings-card,
  .support-card {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .settings-card {
    padding: 14px 12px calc(16px + env(safe-area-inset-bottom));
  }

  .settings-header {
    align-items: flex-start;
    gap: 10px;
  }

  .settings-title-wrap h2 {
    font-size: 24px;
  }

  .settings-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-tab-btn {
    font-size: 13px;
  }

  .user-data-row {
    grid-template-columns: 1fr;
  }

  .user-data-row-actions {
    justify-content: flex-start;
  }

  /* Mobile Tab Bar Redesign */
  .sidebar {
    display: none !important;
  }

  .main {
    height: 100dvh;
    padding: 14px 12px calc(80px + env(safe-area-inset-bottom)) !important;
    overflow: auto;
  }

  .mobile-nav-backdrop {
    display: block !important;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  }

  .mobile-nav-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-nav-drawer {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    bottom: calc(-100% - 100px);
    left: 0;
    right: 0;
    max-height: 50dvh;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(8, 14, 28, 0.98));
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -15px 42px rgba(0, 0, 0, 0.6);
    z-index: 999;
    padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
    transition: bottom 0.35s cubic-bezier(0.32, 0.94, 0.6, 1);
    direction: rtl;
    gap: 16px;
  }

  .mobile-nav-drawer.open {
    bottom: calc(58px + env(safe-area-inset-bottom));
  }

  .mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
  }

  .mobile-drawer-header h3 {
    font-size: 17px;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
  }

  .mobile-drawer-header button {
    font-size: 18px;
    color: #94a3b8;
    padding: 4px 8px;
    border: none;
    background: none;
    cursor: pointer;
  }

  .mobile-drawer-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    max-height: calc(50dvh - 90px);
    padding-bottom: 10px;
  }

  .mobile-drawer-option-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    color: #e2e8f0;
    font-size: 15px;
    font-weight: 500;
    text-align: right;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .mobile-drawer-option-btn:active {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.3);
    color: #60a5fa;
  }

  .mobile-drawer-option-btn .option-icon {
    font-size: 18px;
  }

  .mobile-nav-dock {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(58px + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
    background: rgba(11, 19, 38, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1.5px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.45);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    direction: rtl;
  }

  .mob-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 10px;
    font-weight: 500;
    gap: 3px;
    flex: 1;
    height: 100%;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
  }

  .mob-nav-item .mob-nav-icon {
    font-size: 19px;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
  }

  .mob-nav-item .mob-nav-label {
    opacity: 0.85;
  }

  .mob-nav-item.active {
    color: #3b82f6;
  }

  .mob-nav-item.active .mob-nav-icon {
    transform: translateY(-2px) scale(1.15);
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.4));
  }

  .mob-nav-item.active .mob-nav-label {
    font-weight: 700;
    color: #3b82f6;
  }
}

/* Boot loader */
.boot-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(2, 6, 23, 0.6);
  backdrop-filter: blur(8px);
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.boot-loader.hidden {
  opacity: 0;
}
.boot-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(96, 165, 250, 0.2);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: bootSpin 1s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}
@keyframes bootSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Trainee Mode (Onboarding) */
body.trainee-mode #crm-view,
body.trainee-mode #finance-view,
body.trainee-mode #team-permissions-view {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
  opacity: 0.6;
}

body.trainee-mode #internal-feed-composer-wrap,
body.trainee-mode #feed-composer-popover,
body.trainee-mode #internal-feed-attachments-preview,
body.trainee-mode #internal-feed-send {
  display: none !important;
}

body.trainee-mode .pill:not(#nav-academy):not(#nav-calendar):not(#nav-feed):not(#auth-toggle) {
  opacity: 0.3;
  pointer-events: none;
  filter: grayscale(1);
}

/* Academy Workspace */
/* Academy Workspace - Course Layout */
.academy-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  height: calc(100vh - 64px);
  overflow: hidden;
  background: #020617;
}

.academy-main {
  padding: 32px 48px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.academy-sidebar {
  background: #0f172a;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Sidebar Playlist */
.academy-sidebar-header {
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.academy-sidebar-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #f8fafc;
}

.academy-sidebar-progress {
  font-size: 13px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
}

.academy-progress-bar {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.academy-progress-fill {
  height: 100%;
  background: #38bdf8;
  transition: width 0.3s ease;
}

.academy-lesson-item {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: background 0.2s;
  color: #cbd5e1;
}

.academy-lesson-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.academy-lesson-item.active {
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border-right: 3px solid #38bdf8;
}

.academy-lesson-item.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.academy-lesson-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.academy-lesson-item.completed .academy-lesson-icon {
  background: #10b981;
  color: #fff;
}

/* Main Area Elements */
.academy-video-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.academy-video-wrapper iframe,
.academy-video-wrapper video {
  width: 100%;
  height: 100%;
  border: none;
}

.academy-video-intercept {
  position: absolute;
  inset: 0;
  z-index: 10;
  clip-path: inset(calc(100% - 50px) 0 0 0);
  cursor: not-allowed;
}

.academy-lesson-title {
  font-size: 28px;
  font-weight: 800;
  color: #f8fafc;
  margin-top: 8px;
}

.academy-lesson-content {
  font-size: 16px;
  line-height: 1.7;
  color: #cbd5e1;
  white-space: pre-wrap;
}

.academy-checklists {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  background: rgba(15, 23, 42, 0.6);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.academy-checklists h4 {
  margin: 0 0 12px 0;
  color: #e2e8f0;
}

.academy-checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.academy-checklist-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #38bdf8;
  cursor: pointer;
  margin-top: 3px;
}

.academy-checklist-item span {
  font-size: 15px;
  color: #cbd5e1;
  line-height: 1.5;
}

.academy-next-action {
  margin-top: 32px;
  display: flex;
  justify-content: flex-start;
}

.academy-next-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: #38bdf8;
  color: #0f172a;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.academy-next-btn:hover:not(:disabled) {
  background: #0ea5e9;
  transform: translateX(-4px);
}

.academy-next-btn:disabled {
  background: rgba(255, 255, 255, 0.1);
  color: #64748b;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .academy-layout {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }
  .academy-main {
    padding: 24px;
  }
}

/* Admin Academy Editor */
.academy-admin-tools {
  background: rgba(30, 41, 59, 0.8);
  padding: 20px;
  border-radius: 12px;
  border: 1px dashed #38bdf8;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.academy-admin-tools select,
.academy-admin-tools input[type="text"],
.academy-admin-tools textarea {
  width: 100%;
  padding: 12px;
  background: #0f172a;
  border: 1px solid rgba(255,255,255,0.1);
  color: #e2e8f0;
  border-radius: 8px;
  font-family: inherit;
}

.academy-admin-tools textarea {
  resize: vertical;
  min-height: 120px;
}

/* Green Toast and Lead Row Highlighting */
.toast.toast-green {
  background: #065f46 !important;
  color: #ffffff !important;
  border: 1px solid #047857 !important;
  box-shadow: 0 10px 24px rgba(4, 120, 87, 0.4) !important;
}

.toast.toast-green .toast-undo {
  display: none !important;
}

.toast-action {
  background: #059669;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s ease, transform 0.1s ease;
  font-family: inherit;
}

.toast-action:hover {
  background: #047857;
  transform: translateY(-1px);
}

.toast-action:active {
  transform: translateY(0);
}

.toast.toast-green .toast-action {
  display: inline-block !important;
}

/* CRM Row Highlighting Animation */
@keyframes crm-row-pulse-green {
  0% {
    background-color: rgba(16, 185, 129, 0.05);
  }
  100% {
    background-color: rgba(16, 185, 129, 0.2);
  }
}

.crm-row-highlight-green td {
  border-top: 2px solid #10b981 !important;
  border-bottom: 2px solid #10b981 !important;
  animation: crm-row-pulse-green 0.6s ease-in-out infinite alternate;
}

.crm-row-highlight-green td:first-child {
  border-left: 2px solid #10b981 !important;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.crm-row-highlight-green td:last-child {
  border-right: 2px solid #10b981 !important;
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

.crm-row-highlight-fade td {
  transition: border-color 1.0s ease, background-color 1.0s ease;
  border-top-color: transparent !important;
  border-bottom-color: transparent !important;
  border-left-color: transparent !important;
  border-right-color: transparent !important;
  background-color: transparent !important;
}

/* Connect Facebook Sub-Panel in Integrations Card */
.fb-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #1e293b;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 16px;
  font-family: inherit;
}

.fb-account-box {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.fb-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1877f2;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
}

.fb-account-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.fb-account-name {
  font-weight: 600;
  color: #f8fafc;
}

.fb-account-status {
  font-size: 11px;
  color: #94a3b8;
}

.fb-row-flex {
  display: flex;
  gap: 10px;
}

.fb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.fb-field span {
  font-size: 12px;
  color: #94a3b8;
}

.fb-field select {
  padding: 8px 10px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border-radius: 6px;
  font-family: inherit;
}

.fb-campaigns-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  max-height: 150px;
  overflow-y: auto;
}

.fb-campaign-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.01);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.fb-campaign-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fb-campaign-name {
  font-weight: 500;
  color: #f1f5f9;
  font-size: 13px;
}

.fb-campaign-form {
  font-size: 11px;
  color: #64748b;
}

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

.fb-campaign-actions button {
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 4px;
}

/* Recruitment Tracking Styles */
.recruitment-table {
  border-collapse: collapse;
}

.recruitment-table th {
  font-size: 11px !important;
  text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

.recruitment-table td {
  padding: 4px 6px !important;
}

.recruitment-badge {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  line-height: 24px;
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  transition: all 0.2s cubic-bezier(0.2, 1, 0.2, 1);
  user-select: none;
}

.badge-v {
  background: #10b981 !important; /* Premium Emerald */
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.45);
}

.badge-x {
  background: #ef4444 !important; /* Premium Red */
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.45);
}

.badge-clock {
  background: #f59e0b !important; /* Premium Amber */
  color: #ffffff !important;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.45);
}

.badge-empty {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px dashed rgba(255, 255, 255, 0.15) !important;
  color: transparent;
}

.badge-empty::after {
  content: "＋";
  color: rgba(255, 255, 255, 0.25);
  font-size: 11px;
}

.recruitment-badge:hover {
  transform: scale(1.15);
}

.badge-empty:hover {
  background: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
}
.badge-empty:hover:after {
  color: rgba(255, 255, 255, 0.8);
}

/* Onboarding Profiles */
.profile-list-card {
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-list-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(212, 175, 55, 0.6);
}
.profile-list-card.selected {
  background: rgba(37, 99, 235, 0.15) !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.25);
}
.profile-list-card .name {
  font-weight: 700;
  font-size: 14px;
  color: #ffffff;
}
.profile-list-card .niche {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* --- EMPLOYEE TIME TRACKING --- */
.tracking-table-container {
  display: flex;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 80vh;
}

.tracking-employee-name {
  background: var(--accent-soft);
  color: var(--text);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  padding: 20px 10px;
  border-left: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 2px;
}

.tracking-table-scroll {
  flex: 1;
  overflow: auto;
}

.tracking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.tracking-table th {
  position: sticky;
  top: 0;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  border-left: 1px solid rgba(255,255,255,0.05);
  padding: 10px 4px;
  font-weight: 500;
  text-align: center;
  z-index: 10;
  white-space: nowrap;
}

.tracking-table td {
  border-bottom: 1px solid rgba(255,255,255,0.05);
  border-left: 1px solid rgba(255,255,255,0.05);
  padding: 0;
  text-align: center;
}

.tracking-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

.tracking-table tr.total-row td {
  background: rgba(0,0,0,0.5);
  font-weight: bold;
  font-size: 16px;
  padding: 10px;
  border-top: 2px solid var(--border);
}

.tracking-table input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--text);
  text-align: center;
  padding: 8px 4px;
  font-family: monospace;
  font-size: 14px;
}
.tracking-table input:focus {
  background: rgba(255,255,255,0.05);
  outline: none;
}
.tracking-table input[type="text"].notes-input {
  font-family: inherit;
  text-align: right;
  padding: 8px 10px;
}

/* --- Active Clients & Timeline --- */
.vp-client-grid-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  overflow: hidden;
}
.vp-client-grid-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}
.vp-client-grid-card.status-color-red, .vp-package-card.status-color-red { border: 1px solid rgba(252, 165, 165, 0.5) !important; }
.vp-client-grid-card.status-color-yellow, .vp-package-card.status-color-yellow { border: 1px solid rgba(253, 224, 71, 0.5) !important; }
.vp-client-grid-card.status-color-green, .vp-package-card.status-color-green { border: 1px solid rgba(134, 239, 172, 0.5) !important; }
.vp-client-grid-card.status-color-gray, .vp-package-card.status-color-gray { border: 1px solid rgba(203, 213, 225, 0.5) !important; }
.vp-client-grid-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: white;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.vp-client-grid-card .vp-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #a0aec0;
}
.vp-client-grid-card .vp-stats div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vp-del-client-card {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(220, 38, 38, 0.1);
  color: #ef4444;
  border: 1px solid rgba(220, 38, 38, 0.2);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 2;
}
.vp-client-grid-card:hover .vp-del-client-card {
  opacity: 1;
}
.vp-del-client-card:hover {
  background: #ef4444;
  color: #fff;
}

/* Detail View Fields */
.vp-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.vp-field-group label {
  font-size: 11px;
  color: #9ca3af;
  font-weight: 500;
}
.vp-field-group input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  padding: 4px 0;
  width: 140px;
  transition: border-color 0.2s ease;
  outline: none;
}
.vp-field-group input:focus {
  border-bottom-color: var(--gold);
}

/* Timeline Groups */
.vp-timeline-month-group {
  display: flex;
  position: relative;
  margin-bottom: 25px;
}

.vp-timeline-month-label {
  width: 30px;
  flex-shrink: 0;
  position: sticky;
  top: 50%;
  transform: translateY(-50%);
  height: fit-content;
  display: flex;
  justify-content: center;
}

.vp-timeline-month-label span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: #9ca3af;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

.vp-timeline-month-items {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  border-right: 2px solid rgba(255,255,255,0.15);
  padding-right: 20px;
  position: relative;
}

/* Timeline */
.vp-timeline-item {
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.05);
  position: relative;
}

.vp-timeline-item::before {
  content: "";
  position: absolute;
  right: -22px;
  top: 24px;
  width: 21px;
  height: 2px;
  background: rgba(255,255,255,0.15);
}
.vp-timeline-item.type-request {
  border-right: 3px solid #3b82f6; /* blue */
  background: linear-gradient(90deg, rgba(59,130,246,0.1) 0%, rgba(59,130,246,0.02) 100%);
}
.vp-timeline-item.type-preference {
  border-right: 3px solid #ef4444; /* red/pink */
  background: linear-gradient(90deg, rgba(239,68,68,0.1) 0%, rgba(239,68,68,0.02) 100%);
}
.vp-timeline-item.type-note {
  border-right: 3px solid var(--gold);
  background: linear-gradient(90deg, rgba(236,201,164,0.1) 0%, rgba(236,201,164,0.02) 100%);
}
.vp-timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #9ca3af;
}
.vp-timeline-header .vp-del-note {
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s;
}
.vp-timeline-item:hover .vp-del-note {
  opacity: 1;
}
.vp-timeline-header .vp-del-note:hover {
  color: #ef4444;
}
.vp-timeline-body {
  overscroll-behavior-y: none;
  font-size: 14.5px;
  color: #e2e8f0;
  white-space: pre-wrap;
  line-height: 1.5;
}



/* Employee Permissions Cards */
.employee-grid-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}
.employee-grid-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.employee-grid-card.status-active { border: 1px solid rgba(134, 239, 172, 0.3); }
.employee-grid-card.status-inactive { border: 1px solid rgba(252, 165, 165, 0.3); }

.employee-grid-card h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: white;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.employee-grid-card .employee-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #a0aec0;
}

.employee-permissions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  background: rgba(0,0,0,0.1);
  padding: 12px;
  border-radius: 8px;
  border: 1px dashed rgba(255,255,255,0.1);
}

.employee-permissions-list .perm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #cbd5e1;
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.employee-permissions-list .perm-row:last-child {
  border-bottom: none;
}
.employee-permissions-list select {
  padding: 4px 8px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: 6px;
  font-size: 12px;
  outline: none;
}
.employee-permissions-list input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
}

.employee-grid-card .user-data-row-actions {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid rgba(255,255,255,0.05);
  justify-content: space-between;
}

.employee-grid-card .employee-permissions-list,
.employee-grid-card .user-data-row-actions {
  display: none;
}
.employee-grid-card.expanded .employee-permissions-list,
.employee-grid-card.expanded .user-data-row-actions {
  display: flex;
}

/* Employee Modal Styles */
.modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal.hidden {
  display: none !important;
}
.modal-content {
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.emp-tab-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 12px 4px;
  font-size: 14px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}
.emp-tab-btn:hover {
  color: #fff;
}
.emp-tab-btn.active {
  color: #fff;
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.emp-history-item {
  display: flex;
  flex-direction: column;
  padding: 10px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  border-right: 3px solid var(--primary);
}
.emp-doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background: rgba(0,0,0,0.2);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
}
.emp-doc-item a {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 500;
}
.emp-doc-item a:hover {
  text-decoration: underline;
}

/* ─── Recruitment Table ─────────────────────────────────────────── */
.recruitment-table {
  table-layout: auto;
  font-size: 12px;
}

.recruitment-table th {
  padding: 4px 3px;
  white-space: nowrap;
  font-size: 14px; /* emoji bigger */
  text-align: center;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.15s;
}

.recruitment-table th:hover {
  background: rgba(255,255,255,0.05);
}

.recruitment-table td {
  padding: 3px 4px;
  vertical-align: middle;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Checklist cells: very tight */
.recruitment-table td:has(.recruitment-badge) {
  text-align: center;
  width: 36px;
  min-width: 36px;
  max-width: 40px;
  padding: 2px;
}

.recruitment-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, background 0.1s;
  user-select: none;
}

.recruitment-badge:hover {
  transform: scale(1.15);
}

.recruitment-badge.badge-v {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.recruitment-badge.badge-x {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.recruitment-badge.badge-clock {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-size: 10px;
}

.recruitment-badge.badge-empty {
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 16px;
}

/* crm-cell inside recruitment: compact */
.recruitment-table .crm-cell {
  min-width: 60px;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 4px;
  font-size: 12px;
}

/* ⏰ תזכורות + 📤 ממתינות לאישור (renderer/reminders-view.js, tab ai-reminders) — big tap targets for the iPhone PWA */
#ai-reminders-view { color: #e8eefc; }
.rv { max-width: 760px; margin: 0 auto; padding: 18px 16px 40px; font-family: "Heebo", "Rubik", sans-serif; }
.rv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.rv-title { font-size: 22px; font-weight: 700; color: var(--gold, #d4b46a); }
.rv-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.rv-tab { flex: 1; min-height: 50px; border-radius: 14px; border: 1px solid rgba(143,163,194,0.25); background: rgba(255,255,255,0.04); color: #c9d4ea; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; touch-action: manipulation; }
.rv-tab.on { background: linear-gradient(180deg, #16305e, #0f2348); border-color: #3b6fd1; color: #fff; }
.rv-count { display: inline-block; min-width: 22px; padding: 1px 7px; border-radius: 11px; background: rgba(255,255,255,0.12); font-size: 13px; margin-inline-start: 4px; }
.rv-count-hot { background: #b3263e; color: #fff; }
.rv-hint { font-size: 13px; color: #8fa3c2; margin: 4px 2px 12px; line-height: 1.5; }
.rv-h { font-size: 15px; font-weight: 700; margin: 18px 2px 8px; color: #fff; }
.rv-h-done { color: #8a93a3; }
.rv-card { border-radius: 16px; padding: 14px; margin-bottom: 10px; border: 1px solid rgba(143,163,194,0.18); background: rgba(255,255,255,0.03); }
.rv-open { background: linear-gradient(180deg, rgba(37,99,235,0.18), rgba(37,99,235,0.08)); border-color: rgba(96,165,250,0.45); }
.rv-done { background: rgba(255,255,255,0.025); border-color: rgba(255,255,255,0.07); color: #8a93a3; filter: grayscale(1); }
.rv-done .rv-text { color: #9aa3b2; }
.rv-hi { box-shadow: 0 0 0 2px #d4b46a; }
.rv-when { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.rv-text { font-size: 16px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.rv-chip { display: inline-block; padding: 2px 9px; border-radius: 10px; background: rgba(255,255,255,0.1); font-size: 12px; font-weight: 600; white-space: nowrap; }
.rv-mut { color: #8fa3c2; }
.rv-small { font-size: 12px; }
.rv-warn { display: block; color: #fbbf24; font-size: 13px; margin-top: 6px; }
.rv-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rv-btn { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 1px solid rgba(143,163,194,0.3); background: rgba(255,255,255,0.06); color: #e8eefc; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: rgba(0,0,0,0); }
.rv-btn:disabled { opacity: 0.5; cursor: default; }
.rv-big { min-height: 54px; flex: 1 1 0; font-size: 17px; }
.rv-ok { background: #15803d; border-color: #22c55e; color: #fff; }
.rv-bad { background: rgba(179,38,62,0.25); border-color: #b3263e; color: #ffd5dc; }
.rv-soft { background: rgba(59,130,246,0.15); border-color: rgba(96,165,250,0.45); }
.rv-ghost { background: transparent; }
.rv-acc { background: linear-gradient(180deg, #7c5cff, #5b3fd6); border-color: #8b6dff; color: #fff; width: 100%; flex: none; }
.rv-ob-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.rv-who { font-size: 17px; font-weight: 700; }
.rv-why { font-size: 14px; color: #c9d4ea; margin-top: 8px; }
.rv-ctx { font-size: 14px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,0.04); white-space: pre-wrap; word-break: break-word; }
.rv-bubble { margin-top: 10px; padding: 12px 14px; border-radius: 14px 14px 4px 14px; background: #0f3d2e; border: 1px solid rgba(34,197,94,0.35); font-size: 16px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.rv-fresh { border-color: #d4b46a; box-shadow: 0 0 0 1px rgba(212,180,106,0.5); }
.rv-freshtag { margin-top: 10px; font-size: 13px; font-weight: 700; color: #d4b46a; }
.rv-working { margin-top: 8px; font-size: 14px; color: #c4b5fd; }
.rv-note { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.rv-note textarea { width: 100%; min-height: 84px; border-radius: 12px; border: 1px solid rgba(143,163,194,0.35); background: rgba(0,0,0,0.25); color: #fff; font: inherit; font-size: 16px; padding: 10px 12px; resize: vertical; }
.rv-msg { margin-bottom: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(34,197,94,0.15); border: 1px solid rgba(34,197,94,0.4); font-size: 15px; }
.rv-err { background: rgba(179,38,62,0.18); border-color: rgba(179,38,62,0.5); color: #ffd5dc; }
.rv-empty { padding: 18px; text-align: center; color: #8fa3c2; font-size: 15px; border-radius: 14px; }
@media (max-width: 760px) {
  .rv { padding: 6px 0 40px; }
  .rv-actions .rv-big { flex: 1 1 30%; }
}
