:root{--bg:#05070d;--panel:#0b1019;--panel2:#101827;--line:rgba(255,255,255,.11);--text:#fff;--muted:rgba(255,255,255,.68);--red:#991b1b;--red2:#dc2626}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;font-family:Inter,system-ui,Segoe UI,sans-serif;background:radial-gradient(circle at top,#220916,#08050b 46%,#020309);color:var(--text);overflow:hidden}.hidden{display:none!important}button,a,input,textarea{font:inherit}.primary-btn,.secondary-btn,.widget-send-btn{border:0;border-radius:14px;padding:10px 14px;color:#fff;background:linear-gradient(135deg,var(--red),var(--red2));font-weight:800;text-decoration:none;cursor:pointer}.secondary-btn{border:1px solid var(--line);background:rgba(255,255,255,.06)}.icon-btn{min-width:38px;height:38px;border:1px solid var(--line);border-radius:13px;background:rgba(255,255,255,.06);color:#fff;cursor:pointer}.guest-page{height:100svh;display:grid;place-items:center}.guest-card{width:min(520px,calc(100vw - 32px));text-align:center;border:1px solid var(--line);border-radius:28px;background:rgba(10,15,25,.9);padding:36px}.guest-card img{width:76px}
.workspace-topbar{width:min(1720px,calc(100vw - 56px));min-height:78px;margin:18px auto;padding:14px 22px;display:flex;align-items:center;justify-content:space-between;border:1px solid var(--line);border-radius:24px;background:linear-gradient(135deg,rgba(12,18,30,.96),rgba(91,9,27,.82));box-shadow:0 24px 80px rgba(0,0,0,.36)}.workspace-brand{display:flex;align-items:center;gap:12px}.workspace-brand img{width:46px;height:46px;object-fit:contain}.workspace-brand strong{display:block;font-size:1.15rem}.workspace-brand span{display:block;color:var(--muted);font-size:.86rem}.workspace-topbar-right{display:flex;align-items:center;gap:22px}.logout-btn{padding:14px 24px;border-radius:18px;background:linear-gradient(135deg,var(--red),var(--red2));color:#fff;text-decoration:none;font-weight:900}
.page-shell{width:min(1720px,calc(100vw - 56px));height:calc(100svh - 126px);margin:0 auto;position:relative;overflow:hidden}.workspace-canvas{position:relative;width:100%;height:100%;overflow:hidden;border-radius:28px;border:1px solid var(--line);background:linear-gradient(135deg,rgba(7,12,22,.78),rgba(29,8,19,.62));box-shadow:inset 0 0 0 1px rgba(255,255,255,.03),0 24px 90px rgba(0,0,0,.28)}
.workspace-bottom-actions{position:fixed;left:max(28px,calc((100vw - min(1720px,calc(100vw - 56px)))/2 + 18px));bottom:28px;display:flex;gap:12px;z-index:9000}.module-add-btn{width:58px;height:58px;border:1px solid var(--line);border-radius:20px;background:rgba(12,18,30,.88);display:grid;place-items:center;box-shadow:0 16px 50px rgba(0,0,0,.34);cursor:pointer}.module-add-btn img{width:42px;height:42px;object-fit:contain}.module-add-btn:hover{transform:translateY(-1px);border-color:rgba(255,255,255,.28)}
.dashboard-quick-menu{position:fixed;left:max(28px,calc((100vw - min(1720px,calc(100vw - 56px)))/2 + 18px));bottom:98px;width:320px;padding:12px;border:1px solid var(--line);border-radius:24px;background:rgba(8,12,20,.98);box-shadow:0 30px 90px rgba(0,0,0,.5);z-index:9200}.dashboard-quick-header,.dashboard-quick-item,.dashboard-quick-link{width:100%;display:flex;align-items:center;gap:12px;padding:12px;border:0;border-radius:16px;background:transparent;color:#fff;text-decoration:none;text-align:left;cursor:pointer}.dashboard-quick-header:hover,.dashboard-quick-item:hover,.dashboard-quick-link:hover{background:rgba(255,255,255,.08)}.dashboard-quick-item img{width:26px;height:26px;object-fit:contain}.dashboard-quick-header span span,.dashboard-quick-header small{display:block}.avatar-dot{width:44px;height:44px;border-radius:16px;background:linear-gradient(135deg,var(--red),#220916);display:inline-block}.avatar-dot.large{width:82px;height:82px;border-radius:26px}.dashboard-quick-menu hr{border:0;border-top:1px solid var(--line);margin:8px 0}
.chat-panel{position:absolute;left:50%;bottom:28px;transform:translateX(-50%);width:min(900px,calc(100% - 300px));max-height:min(720px,calc(100% - 44px));min-height:150px;display:flex;flex-direction:column;border-radius:28px;border:1px solid var(--line);background:rgba(7,11,18,.96);box-shadow:0 30px 90px rgba(0,0,0,.48);overflow:hidden;z-index:5000}.chat-header{height:58px;min-height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--line);background:rgba(15,23,42,.76);cursor:move}.chat-title{display:flex;align-items:center;gap:10px}.chat-title img{width:30px;height:30px;object-fit:contain}.chat-actions{display:flex;gap:8px}.chat-messages{min-height:220px;max-height:420px;overflow-y:auto;padding:16px;display:flex;flex-direction:column;gap:12px}.message{max-width:86%;padding:12px 14px;border-radius:18px;background:rgba(255,255,255,.07);white-space:pre-wrap;word-break:break-word}.message.user{align-self:flex-end;background:linear-gradient(135deg,var(--red),var(--red2))}.message.ai{align-self:flex-start}.chat-composer{padding:12px;border-top:1px solid var(--line);background:rgba(10,15,25,.92)}.chat-composer-row{display:flex;align-items:flex-end;gap:10px}.chat-composer textarea{flex:1;min-height:54px;max-height:160px;resize:none;border-radius:18px;border:1px solid var(--line);background:rgba(6,11,20,.92);color:#fff;padding:14px 16px;outline:0}.chat-send-btn{width:58px;height:54px;border:0;border-radius:18px;background:linear-gradient(135deg,var(--red),var(--red2));color:#fff;font-size:26px;font-weight:900;cursor:pointer}.chat-attach-trigger{width:54px;height:54px;border-radius:18px;border:1px solid var(--line);background:rgba(255,255,255,.06);color:#fff;font-size:24px;cursor:pointer}.chat-attach-panel{position:absolute;left:16px;bottom:86px;width:280px;padding:10px;border:1px solid var(--line);border-radius:20px;background:rgba(8,12,20,.99);box-shadow:0 24px 80px rgba(0,0,0,.42);z-index:7000}.attach-menu-item{width:100%;display:flex;align-items:center;gap:12px;border:0;border-radius:15px;background:transparent;color:#fff;padding:11px;cursor:pointer;text-align:left}.attach-menu-item:hover{background:rgba(255,255,255,.08)}.attach-menu-item img{width:32px;height:32px;object-fit:contain}.chat-composer-attachments{display:flex;gap:8px;overflow-x:auto;padding:0 0 10px}.attachment-chip{display:flex;align-items:center;gap:8px;max-width:260px;border:1px solid var(--line);border-radius:14px;padding:8px;background:rgba(255,255,255,.055);color:#fff}.attachment-chip img{width:42px;height:42px;object-fit:cover;border-radius:10px}.restore-chat-btn{position:fixed;right:28px;bottom:28px;z-index:9300;border:1px solid var(--line);border-radius:18px;background:linear-gradient(135deg,var(--red),var(--red2));color:#fff;padding:14px 18px;font-weight:900;cursor:pointer}
.widget-window{position:absolute;width:720px;height:520px;left:100px;top:70px;border:1px solid var(--line);border-radius:24px;background:rgba(9,13,22,.98);box-shadow:0 28px 90px rgba(0,0,0,.5);overflow:hidden;color:#fff;z-index:3000}.widget-window.fullscreen{left:12px!important;top:12px!important;width:calc(100% - 24px)!important;height:calc(100% - 24px)!important}.widget-header{height:58px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;border-bottom:1px solid var(--line);background:linear-gradient(135deg,rgba(15,23,42,.95),rgba(91,9,27,.72));cursor:move}.widget-title{display:flex;align-items:center;gap:12px;font-weight:900}.widget-title img{width:32px;height:32px;object-fit:contain}.widget-header-actions{display:flex;gap:8px}.widget-body{height:calc(100% - 58px);overflow:auto;padding:14px;background:rgba(9,13,22,.96);color:#fff}.widget-dock{position:fixed;right:28px;bottom:28px;display:flex;gap:8px;z-index:9200}.widget-dock-tab{width:50px;height:50px;border:1px solid var(--line);border-radius:16px;background:rgba(9,13,22,.94);display:grid;place-items:center;cursor:pointer}.widget-dock-tab img{width:36px;height:36px;object-fit:contain}
.app-launcher-modal,.dashboard-modal{position:fixed;inset:0;background:rgba(0,0,0,.5);display:grid;place-items:center;z-index:9500}.modal-card{width:min(940px,calc(100vw - 44px));max-height:calc(100svh - 64px);overflow:auto;border:1px solid var(--line);border-radius:26px;background:rgba(8,12,20,.99);box-shadow:0 30px 90px rgba(0,0,0,.52)}.modal-head{height:66px;display:flex;align-items:center;justify-content:space-between;padding:0 18px;border-bottom:1px solid var(--line)}.app-launcher-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(126px,1fr));gap:14px;padding:18px}.app-launcher-item{min-height:120px;border:1px solid var(--line);border-radius:20px;background:rgba(255,255,255,.05);color:#fff;display:grid;place-items:center;gap:8px;cursor:pointer}.app-launcher-item img{width:64px;height:64px;object-fit:contain}.dashboard-custom-shell{display:grid;grid-template-columns:280px 1fr;min-height:560px}.dashboard-custom-sidebar{border-right:1px solid var(--line);padding:18px}.dashboard-custom-profile-card{display:grid;gap:8px;margin-bottom:18px}.dashboard-tab-btn{width:100%;display:block;margin:8px 0;border:1px solid var(--line);border-radius:15px;background:rgba(255,255,255,.05);color:#fff;padding:12px;text-align:left;cursor:pointer}.dashboard-tab-btn.active{background:linear-gradient(135deg,var(--red),var(--red2))}.dashboard-custom-content{padding:20px}.dashboard-pane{display:none}.dashboard-pane.active{display:block}.dashboard-grid,.plan-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.dashboard-grid label,.plan-card{display:grid;gap:6px;border:1px solid var(--line);border-radius:18px;padding:14px;background:rgba(255,255,255,.04)}.dashboard-grid input,.app-input,.app-textarea,.widget-window input,.widget-window textarea,.widget-window select{width:100%;border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.06);color:#fff;padding:11px}.app-textarea{min-height:130px;resize:vertical}.app-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.app-tabs button{border:1px solid var(--line);border-radius:14px;background:rgba(255,255,255,.06);color:#fff;padding:9px 12px;cursor:pointer}.app-tabs button.active{background:linear-gradient(135deg,var(--red),var(--red2))}.app-card,.gmail-message-row,.file-tile{width:100%;border:1px solid var(--line);border-radius:18px;background:rgba(15,23,42,.9);color:#fff;padding:12px;margin-bottom:10px;text-align:left}.gmail-message-row{display:grid;grid-template-columns:minmax(170px,260px) minmax(0,1fr) auto;gap:12px;cursor:pointer}.gmail-message-subject,.gmail-message-snippet{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gmail-reader-body{white-space:pre-wrap;color:#fff}.excel-table{border-collapse:collapse;width:max-content;min-width:100%;background:rgba(0,0,0,.2)}.excel-table th,.excel-table td{border:1px solid rgba(255,255,255,.12);min-width:96px;height:34px;padding:6px;color:#fff}.excel-table th{background:rgba(255,255,255,.08)}.file-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}.media-card{width:min(1100px,calc(100vw - 44px))}.media-body{padding:16px}.media-body img,.media-body video{max-width:100%;border-radius:18px}
*{scrollbar-width:auto;scrollbar-color:rgba(185,28,45,.92) rgba(10,14,22,.9)}*::-webkit-scrollbar{width:16px;height:16px}*::-webkit-scrollbar-track{background:rgba(10,14,22,.9)}*::-webkit-scrollbar-thumb{background:rgba(185,28,45,.92);border-radius:999px;border:3px solid rgba(10,14,22,.9)}
@media(max-width:900px){.workspace-topbar,.page-shell{width:calc(100vw - 20px)}.page-shell{height:calc(100svh - 112px)}.workspace-bottom-actions{left:12px;bottom:92px;transform:scale(.9);transform-origin:bottom left}.chat-panel{width:calc(100% - 20px);max-width:calc(100% - 20px);bottom:10px}.widget-window{left:10px!important;top:10px!important;width:calc(100% - 20px)!important;height:calc(100% - 120px)!important}.dashboard-custom-shell{grid-template-columns:1fr}.dashboard-custom-sidebar{border-right:0;border-bottom:1px solid var(--line)}.gmail-message-row{grid-template-columns:1fr}}


/* ==== CHAT PLUS DASHBOARD ICON PATCH ==== */
.attach-neutral-icon {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,.08);
  color: #fff;
  font-weight: 900;
  font-size: 22px;
}

.workspace-files-btn img {
  display: none !important;
}

.workspace-files-glyph {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,.75);
  color: #fff;
  font-size: 24px;
  line-height: 1;
}

.dashboard-profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px 0;
}

.dashboard-pane .secondary-btn {
  margin: 6px 6px 6px 0;
}


/* ==== PUBLIC HOMEPAGE RESTORE PATCH ==== */
.public-homepage {
  min-height: 100svh;
  overflow-y: auto;
  background: radial-gradient(circle at top, #310918 0%, #09060d 52%, #020309 100%);
  color: #fff;
  padding: 24px;
}

.public-nav {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(12,18,30,.96), rgba(91,9,27,.82));
}

.public-brand,
.public-links,
.public-hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.public-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.public-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.public-subscribe-btn {
  padding: 11px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, #991b1b, #dc2626);
}

.public-hero {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  min-height: 52svh;
  display: grid;
  place-items: center;
}

.public-hero-card {
  width: min(760px, 100%);
  text-align: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 32px;
  background: rgba(8,12,20,.88);
  box-shadow: 0 30px 100px rgba(0,0,0,.45);
  padding: 42px;
}

.public-hero-card img {
  width: 82px;
  height: 82px;
  object-fit: contain;
}

.public-hero-card h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  margin: 18px 0 10px;
}

.public-hero-card p {
  color: rgba(255,255,255,.72);
  line-height: 1.7;
  font-size: 1.05rem;
}

.public-hero-actions {
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 22px;
}

.public-plans {
  width: min(1180px, calc(100vw - 32px));
  margin: 26px auto 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.public-plans article {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
  background: rgba(255,255,255,.055);
  padding: 18px;
}

.public-plans strong,
.public-plans span {
  display: block;
}

.public-plans span {
  color: rgba(255,255,255,.72);
  margin-top: 6px;
}

/* ==== PROFILE EDIT BUTTON RESTORE ==== */
.profile-pen-btn {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  background: rgba(255,255,255,.07);
  color: #fff;
  font-size: 23px;
  cursor: pointer;
}

.profile-pen-btn:hover {
  background: linear-gradient(135deg, #991b1b, #dc2626);
}

.profile-avatar-edit-wrap {
  position: relative;
  display: inline-grid;
  width: 82px;
  height: 82px;
}

.profile-avatar-edit-wrap .avatar-dot.large {
  grid-area: 1 / 1;
}

.profile-avatar-edit-btn {
  grid-area: 1 / 1;
  align-self: end;
  justify-self: center;
  max-width: 76px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: .18s ease;
  border: 0;
  border-radius: 999px;
  padding: 6px 8px;
  background: rgba(220,38,38,.96);
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.profile-avatar-edit-wrap:hover .profile-avatar-edit-btn,
.profile-avatar-edit-wrap:focus-within .profile-avatar-edit-btn,
.profile-avatar-edit-wrap.active .profile-avatar-edit-btn {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}


/* ==== PROFILE OWNER HOME CHAT PATCH ==== */
.public-hero-card p {
  font-size: 1.18rem;
}

.public-plans {
  display: none !important;
}

.profile-avatar-edit-btn.camera-profile-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  font-size: 18px;
  border-radius: 50%;
  bottom: 6px;
}

.dashboard-profile-actions #dashboardChangeProfilePictureBtn {
  display: none !important;
}

.dashboard-notification-card {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.045);
}

.dashboard-notification-card p {
  color: rgba(255,255,255,.68);
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

#chatPanel.chat-panel {
  left: 50% !important;
  bottom: 26px !important;
  transform: translateX(-50%) scale(1) !important;
  transform-origin: bottom center !important;
  animation: chatPanelGrowIn .22s ease-out;
}

#chatPanel.chat-panel:focus-within {
  animation: chatPanelFocusGrow .18s ease-out;
}

#chatInput:focus {
  box-shadow: 0 0 0 3px rgba(220,38,38,.25);
}

@keyframes chatPanelGrowIn {
  from { opacity: .2; transform: translateX(-50%) scale(.94); }
  to { opacity: 1; transform: translateX(-50%) scale(1); }
}

@keyframes chatPanelFocusGrow {
  from { transform: translateX(-50%) scale(.985); }
  to { transform: translateX(-50%) scale(1); }
}


/* ==== RESTORED POWERPOINT APP CSS ==== */
.ppt-app-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #fff;
}

.ppt-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background: rgba(255,255,255,.045);
}

.ppt-meta-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
  gap: 10px;
}

.ppt-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  min-height: 420px;
}

.ppt-slide-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
}

.ppt-slide-thumb {
  width: 100%;
  min-height: 82px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(15,23,42,.82);
  color: #fff;
  text-align: left;
  padding: 10px;
  cursor: pointer;
}

.ppt-slide-thumb.active {
  border-color: rgba(220,38,38,.85);
  background: linear-gradient(135deg, rgba(127,29,29,.88), rgba(15,23,42,.86));
}

.ppt-slide-thumb strong,
.ppt-slide-thumb small,
.ppt-slide-num {
  display: block;
}

.ppt-slide-num {
  color: #fca5a5;
  font-weight: 900;
  margin-bottom: 4px;
}

.ppt-slide-thumb small {
  color: rgba(255,255,255,.68);
  margin-top: 4px;
}

.ppt-editor {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

.ppt-layout-select {
  max-width: 220px;
}

.ppt-slide-body {
  min-height: 128px;
}

.ppt-preview {
  min-height: 220px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(10,15,25,.96), rgba(63,9,24,.55));
  padding: 24px;
  overflow: auto;
}

.ppt-preview h1,
.ppt-preview h2 {
  margin-top: 0;
}

.ppt-preview-title-layout {
  min-height: 180px;
  display: grid;
  place-items: center;
  text-align: center;
}

.ppt-preview-title-layout h1 {
  font-size: clamp(2rem, 4vw, 4rem);
}

.ppt-preview-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.ppt-preview-image {
  max-width: 100%;
  max-height: 260px;
  display: block;
  border-radius: 16px;
  object-fit: contain;
  margin: 10px 0;
}

.ppt-image-placeholder,
.ppt-blank-preview {
  min-height: 150px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255,255,255,.2);
  border-radius: 18px;
  color: rgba(255,255,255,.68);
}

.ppt-status {
  margin-top: 0;
}

@media (max-width: 900px) {
  .ppt-meta-row,
  .ppt-layout {
    grid-template-columns: 1fr;
  }

  .ppt-slide-list {
    max-height: 180px;
  }

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


/* ==== DASHBOARD SUBSCRIPTION SETTINGS WORKSPACE ACTIONS CSS ==== */
.workspace-actions-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 0 10px;
}

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

.workspace-action-chip {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.065);
  color: #fff;
  padding: 8px 11px;
  font-weight: 800;
  cursor: pointer;
}

.workspace-action-chip:hover {
  background: linear-gradient(135deg, #991b1b, #dc2626);
}

.dashboard-settings-status {
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(255,255,255,.055);
  color: #fff;
}

body.assystem-compact-theme .widget-window,
body.assystem-compact-theme .chat-panel,
body.assystem-compact-theme .modal-card {
  border-radius: 18px !important;
}

body.assystem-reduced-motion *,
body.assystem-reduced-motion *::before,
body.assystem-reduced-motion *::after {
  animation: none !important;
  transition: none !important;
}

.plan-card[data-plan="free"],
.plan-card:first-child:has(strong:first-child) {
  display: none !important;
}


/* ==== WORKSPACE SUBSCRIPTION BETA PRICE CSS ==== */
.plan-card .plan-price {
  display: block;
  margin: 10px 0 8px;
  font-size: 1.5rem;
  font-weight: 950;
  color: #fff;
}

.plan-card .plan-price small {
  font-size: .82rem;
  color: rgba(255,255,255,.72);
  font-weight: 800;
}

.plan-card p {
  color: rgba(255,255,255,.76);
  line-height: 1.45;
}


/* ==== HOMEPAGE WELCOME ACCOUNT PATCH ==== */
body:not(.assystem-signed-in),
.public-homepage {
  animation: publicBodyFadeIn .65s ease-out both;
}

.public-hero-card {
  animation: publicHeroAppear .72s cubic-bezier(.2,.8,.2,1) both;
}

.public-welcome-message {
  margin: 12px auto 14px;
  display: grid;
  gap: 6px;
  animation: publicGreetingRise .85s cubic-bezier(.2,.8,.2,1) .12s both;
}

.public-welcome-message span {
  color: #fff;
  font-weight: 900;
  font-size: clamp(1.1rem, 2vw, 1.55rem);
}

.public-welcome-message small {
  color: rgba(255,255,255,.68);
  font-size: 1rem;
  line-height: 1.5;
}

.create-account-btn {
  border: 1px solid rgba(255,255,255,.16) !important;
  background: rgba(255,255,255,.065) !important;
}

.create-account-btn:hover {
  background: linear-gradient(135deg, #7f1d1d, #dc2626) !important;
}

@keyframes publicBodyFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes publicHeroAppear {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes publicGreetingRise {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}


/* ==== HOMEPAGE SECOND LINE CLEANUP ==== */
.public-hero-card .public-welcome-message {
  margin-bottom: 22px;
}

.public-hero-card > p:empty {
  display: none !important;
}


/* ==== WELCOME TEXT WEIGHT PATCH ==== */
.public-welcome-message span {
  font-weight: 400 !important;
}

.public-welcome-message strong,
.public-welcome-message b {
  font-weight: 400 !important;
}

/* ==== SIGNED WORKSPACE BUTTON RESCUE CSS ==== */
#dashboardModal.hidden,
#appLauncherModal.hidden,
#layoutMenu.hidden,
#chatAttachPanel.hidden,
#restoreChatBtn.hidden,
#dashboardQuickMenu.hidden {
  display: none !important;
  pointer-events: none !important;
}

#dashboardModal:not(.hidden),
#appLauncherModal:not(.hidden),
#layoutMenu:not(.hidden) {
  display: grid !important;
  pointer-events: auto !important;
}

#dashboardQuickMenu:not(.hidden),
#chatAttachPanel:not(.hidden) {
  display: block !important;
  pointer-events: auto !important;
}

#restoreChatBtn:not(.hidden) {
  display: block !important;
  pointer-events: auto !important;
}

.workspace-bottom-actions,
#widgetDock,
#chatPanel {
  pointer-events: auto !important;
}

.module-add-btn,
.icon-btn,
.chat-send-btn,
.chat-attach-trigger,
.app-launcher-item,
.dashboard-quick-item,
.dashboard-quick-header,
.dashboard-tab-btn,
.secondary-btn,
.widget-send-btn {
  pointer-events: auto !important;
  cursor: pointer !important;
}

.widget-window {
  pointer-events: auto !important;
}

.message-attachments {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}


/* ==== CHAT PANEL COLLAPSE DESIGN PATCH ==== */

/* Remove workspace action chips from chat panel. */
#workspaceActionsBar,
.workspace-actions-bar,
.workspace-action-chip {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ChatGPT-style fixed centered composer: no drag movement. */
#chatPanel.chat-panel {
  left: 50% !important;
  right: auto !important;
  bottom: 26px !important;
  top: auto !important;
  transform: translateX(-50%) !important;
  width: min(920px, calc(100% - 320px)) !important;
  max-width: min(920px, calc(100% - 320px)) !important;
  cursor: default !important;
  transition:
    width .22s ease,
    max-height .22s ease,
    background .22s ease,
    border-color .22s ease,
    box-shadow .22s ease,
    transform .22s ease,
    opacity .22s ease !important;
}

#chatHeader,
.chat-header {
  cursor: default !important;
  user-select: none !important;
}

/* Minimized/collapsed: only message box remains. */
#chatPanel.chat-panel.chat-collapsed {
  min-height: 0 !important;
  max-height: 118px !important;
  height: auto !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

#chatPanel.chat-panel.chat-collapsed #chatHeader,
#chatPanel.chat-panel.chat-collapsed #chatMessages {
  display: none !important;
}

#chatPanel.chat-panel.chat-collapsed .chat-composer {
  border-top: 0 !important;
  border-radius: 28px !important;
  background: rgba(10, 15, 25, .92) !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  box-shadow: 0 22px 70px rgba(0,0,0,.44) !important;
  animation: chatComposerAppear .18s ease-out both;
}

/* Expanded: chat history/body appears and grows upward. */
#chatPanel.chat-panel.chat-expanded {
  min-height: 150px !important;
  max-height: min(720px, calc(100% - 44px)) !important;
  background: rgba(7,11,18,.96) !important;
  border-color: rgba(255,255,255,.11) !important;
  box-shadow: 0 30px 90px rgba(0,0,0,.48) !important;
  animation: chatPanelGrowOpen .22s cubic-bezier(.2,.8,.2,1) both !important;
}

#chatPanel.chat-panel.chat-expanded #chatHeader {
  display: flex !important;
  animation: chatBodyFadeIn .18s ease-out both;
}

#chatPanel.chat-panel.chat-expanded #chatMessages {
  display: flex !important;
  animation: chatBodyGrowIn .24s cubic-bezier(.2,.8,.2,1) both;
}

#chatPanel.chat-panel.chat-expanded .chat-composer {
  border-top: 1px solid rgba(255,255,255,.11) !important;
}

/* Message box focus grows the chat body. */
#chatInput:focus {
  box-shadow: 0 0 0 3px rgba(220,38,38,.25) !important;
}

#restoreChatBtn {
  display: none !important;
}

@keyframes chatPanelGrowOpen {
  from {
    opacity: .35;
    transform: translateX(-50%) translateY(14px) scale(.965);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes chatBodyGrowIn {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    max-height: 420px;
    transform: translateY(0);
  }
}

@keyframes chatBodyFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes chatComposerAppear {
  from {
    opacity: .6;
    transform: translateY(10px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 900px) {
  #chatPanel.chat-panel {
    width: calc(100% - 20px) !important;
    max-width: calc(100% - 20px) !important;
    bottom: 10px !important;
  }
}


/* ==== CHAT MESSAGE BOX ALWAYS VISIBLE FINAL CSS ==== */

/* The chat panel must never turn into a restore button or disappear fully. */
#restoreChatBtn,
.restore-chat-btn {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#chatPanel.chat-panel,
#chatPanel.chat-panel.hidden,
#chatPanel.chat-panel.minimized,
#chatPanel.chat-panel.is-minimized {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  position: absolute !important;
  left: 50% !important;
  right: auto !important;
  bottom: 26px !important;
  top: auto !important;
  transform: translateX(-50%) !important;
  width: min(920px, calc(100% - 320px)) !important;
  max-width: min(920px, calc(100% - 320px)) !important;
  cursor: default !important;
}

/* Collapsed = message box only. */
#chatPanel.chat-panel.messagebox-only,
#chatPanel.chat-panel.chat-collapsed {
  min-height: 0 !important;
  height: auto !important;
  max-height: 122px !important;
  overflow: visible !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

#chatPanel.chat-panel.messagebox-only #chatHeader,
#chatPanel.chat-panel.messagebox-only #chatMessages,
#chatPanel.chat-panel.chat-collapsed #chatHeader,
#chatPanel.chat-panel.chat-collapsed #chatMessages {
  display: none !important;
}

#chatPanel.chat-panel.messagebox-only .chat-composer,
#chatPanel.chat-panel.chat-collapsed .chat-composer {
  display: block !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 28px !important;
  background: rgba(10,15,25,.94) !important;
  box-shadow: 0 22px 70px rgba(0,0,0,.44) !important;
  animation: messageBoxAppear .18s ease-out both;
}

/* Expanded = panel body appears upward from the message box. */
#chatPanel.chat-panel.chat-expanded {
  min-height: 150px !important;
  max-height: min(720px, calc(100% - 44px)) !important;
  background: rgba(7,11,18,.96) !important;
  border: 1px solid rgba(255,255,255,.11) !important;
  box-shadow: 0 30px 90px rgba(0,0,0,.48) !important;
  animation: chatPanelGrowFromComposer .24s cubic-bezier(.2,.8,.2,1) both !important;
}

#chatPanel.chat-panel.chat-expanded #chatHeader {
  display: flex !important;
}

#chatPanel.chat-panel.chat-expanded #chatMessages {
  display: flex !important;
  animation: chatHistoryAppear .22s ease-out both;
}

#chatPanel.chat-panel.chat-expanded .chat-composer {
  border-top: 1px solid rgba(255,255,255,.11) !important;
}

/* No dragging cursor. */
#chatHeader,
.chat-header {
  cursor: default !important;
  user-select: none !important;
}

@keyframes messageBoxAppear {
  from {
    opacity: .75;
    transform: translateY(8px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes chatPanelGrowFromComposer {
  from {
    opacity: .35;
    transform: translateX(-50%) translateY(16px) scale(.965);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes chatHistoryAppear {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    max-height: 420px;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  #chatPanel.chat-panel,
  #chatPanel.chat-panel.hidden,
  #chatPanel.chat-panel.minimized,
  #chatPanel.chat-panel.is-minimized {
    width: calc(100% - 20px) !important;
    max-width: calc(100% - 20px) !important;
    bottom: 10px !important;
  }
}

/* ==== RESTORE APPS + ACTIONS + LAUNCHER ANIMATION PATCH ==== */

/* Remove old stuck workspace action chips from composer permanently. */
#workspaceActionsBar,
.workspace-actions-bar {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Inline AssystEM AI actions inside assistant messages only. */
.inline-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.inline-action-chip {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.065);
  color: #fff;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
}

.inline-action-chip:hover {
  background: linear-gradient(135deg, #991b1b, #dc2626);
}

/* App launcher: apps appear visible from left to right. */
#appLauncherModal:not(.hidden) .app-launcher-item {
  opacity: 0;
  transform: translateX(-28px) scale(.98);
  animation: appLauncherLeftToRight .34s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: calc(var(--app-index, 0) * 42ms);
}

@keyframes appLauncherLeftToRight {
  from {
    opacity: 0;
    transform: translateX(-28px) scale(.98);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

/* Restored app UI surfaces. */
.mini-browser-frame {
  width: 100%;
  height: 380px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: #fff;
  margin-top: 12px;
}

.word-editor,
.notes-editor {
  min-height: 360px;
}

.calendar-title {
  font-size: 1.35rem;
  font-weight: 950;
  margin: 10px 0 14px;
}

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

.calendar-grid strong,
.calendar-grid button,
.calendar-grid span {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

.calendar-grid strong {
  color: rgba(255,255,255,.72);
}

.calendar-grid button {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.055);
  color: #fff;
  cursor: pointer;
}

.calendar-grid button:hover {
  background: linear-gradient(135deg, #991b1b, #dc2626);
}

.calendar-event-form {
  display: grid;
  grid-template-columns: 1fr 160px 140px;
  gap: 10px;
  margin: 14px 0;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.file-tile {
  min-height: 96px;
}

.excel-grid {
  max-width: 100%;
  overflow: auto;
}

.excel-table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
}

.excel-table th,
.excel-table td {
  border: 1px solid rgba(255,255,255,.12);
  min-width: 96px;
  height: 34px;
  padding: 6px;
  color: #fff;
}

.excel-table th {
  background: rgba(255,255,255,.08);
}

.ppt-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
}

.ppt-slide-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 460px;
  overflow: auto;
}

.ppt-slide-thumb {
  width: 100%;
  min-height: 82px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(15,23,42,.82);
  color: #fff;
  text-align: left;
  padding: 10px;
  cursor: pointer;
}

.ppt-slide-thumb.active {
  border-color: rgba(220,38,38,.85);
  background: linear-gradient(135deg, rgba(127,29,29,.88), rgba(15,23,42,.86));
}

.ppt-slide-num {
  display: block;
  color: #fca5a5;
  font-weight: 900;
  margin-bottom: 4px;
}

.ppt-preview {
  min-height: 220px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(10,15,25,.96), rgba(63,9,24,.55));
  padding: 24px;
  overflow: auto;
}

.ppt-preview h2 {
  margin-top: 0;
}

@media (max-width: 900px) {
  .calendar-event-form,
  .ppt-layout {
    grid-template-columns: 1fr;
  }
}

/* ==== RESTORE APPS + ACTIONS + LAUNCHER ANIMATION PATCH ==== */

/* Remove old stuck workspace action chips from composer permanently. */
#workspaceActionsBar,
.workspace-actions-bar {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Inline AssystEM AI actions inside assistant messages only. */
.inline-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.inline-action-chip {
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  background: rgba(255,255,255,.065);
  color: #fff;
  padding: 8px 12px;
  font-weight: 800;
  cursor: pointer;
}

.inline-action-chip:hover {
  background: linear-gradient(135deg, #991b1b, #dc2626);
}

/* App launcher: apps appear visible from left to right. */
#appLauncherModal:not(.hidden) .app-launcher-item {
  opacity: 0;
  transform: translateX(-28px) scale(.98);
  animation: appLauncherLeftToRight .34s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: calc(var(--app-index, 0) * 42ms);
}

@keyframes appLauncherLeftToRight {
  from {
    opacity: 0;
    transform: translateX(-28px) scale(.98);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
    filter: blur(0);
  }
}

/* Restored app UI surfaces. */
.mini-browser-frame {
  width: 100%;
  height: 380px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: #fff;
  margin-top: 12px;
}

.word-editor,
.notes-editor {
  min-height: 360px;
}

.calendar-title {
  font-size: 1.35rem;
  font-weight: 950;
  margin: 10px 0 14px;
}

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

.calendar-grid strong,
.calendar-grid button,
.calendar-grid span {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
}

.calendar-grid strong {
  color: rgba(255,255,255,.72);
}

.calendar-grid button {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.055);
  color: #fff;
  cursor: pointer;
}

.calendar-grid button:hover {
  background: linear-gradient(135deg, #991b1b, #dc2626);
}

.calendar-event-form {
  display: grid;
  grid-template-columns: 1fr 160px 140px;
  gap: 10px;
  margin: 14px 0;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.file-tile {
  min-height: 96px;
}

.excel-grid {
  max-width: 100%;
  overflow: auto;
}

.excel-table {
  border-collapse: collapse;
  width: max-content;
  min-width: 100%;
}

.excel-table th,
.excel-table td {
  border: 1px solid rgba(255,255,255,.12);
  min-width: 96px;
  height: 34px;
  padding: 6px;
  color: #fff;
}

.excel-table th {
  background: rgba(255,255,255,.08);
}

.ppt-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
}

.ppt-slide-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 460px;
  overflow: auto;
}

.ppt-slide-thumb {
  width: 100%;
  min-height: 82px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  background: rgba(15,23,42,.82);
  color: #fff;
  text-align: left;
  padding: 10px;
  cursor: pointer;
}

.ppt-slide-thumb.active {
  border-color: rgba(220,38,38,.85);
  background: linear-gradient(135deg, rgba(127,29,29,.88), rgba(15,23,42,.86));
}

.ppt-slide-num {
  display: block;
  color: #fca5a5;
  font-weight: 900;
  margin-bottom: 4px;
}

.ppt-preview {
  min-height: 220px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(10,15,25,.96), rgba(63,9,24,.55));
  padding: 24px;
  overflow: auto;
}

.ppt-preview h2 {
  margin-top: 0;
}

@media (max-width: 900px) {
  .calendar-event-form,
  .ppt-layout {
    grid-template-columns: 1fr;
  }
}

/* ==== FINAL CHAT MINIMIZE MESSAGEBOX CSS ==== */
#restoreChatBtn,
.restore-chat-btn {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#chatPanel.chat-panel,
#chatPanel.chat-panel.hidden,
#chatPanel.chat-panel.minimized,
#chatPanel.chat-panel.is-minimized {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#chatPanel.chat-panel.messagebox-only,
#chatPanel.chat-panel.chat-collapsed {
  min-height: 0 !important;
  height: auto !important;
  max-height: 124px !important;
  overflow: visible !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

#chatPanel.chat-panel.messagebox-only #chatHeader,
#chatPanel.chat-panel.messagebox-only #chatMessages,
#chatPanel.chat-panel.chat-collapsed #chatHeader,
#chatPanel.chat-panel.chat-collapsed #chatMessages {
  display: none !important;
}

#chatPanel.chat-panel.messagebox-only .chat-composer,
#chatPanel.chat-panel.chat-collapsed .chat-composer {
  display: block !important;
  border: 1px solid rgba(255,255,255,.12) !important;
  border-radius: 28px !important;
  background: rgba(10,15,25,.94) !important;
  box-shadow: 0 22px 70px rgba(0,0,0,.44) !important;
}

#chatPanel.chat-panel.chat-expanded #chatHeader {
  display: flex !important;
}

#chatPanel.chat-panel.chat-expanded #chatMessages {
  display: flex !important;
}


/* ==== HOMEPAGE WELCOME TITLE LETTER ANIMATION ==== */
.public-animated-title {
  display: flex !important;
  justify-content: center;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0;
  line-height: 1.05;
  margin: 28px 0 16px !important;
  white-space: normal;
}

.public-animated-title .letter {
  display: inline-block;
  opacity: 0;
  transform: translateX(-18px);
  animation: homepageLetterIn .42s cubic-bezier(.2,.8,.2,1) forwards;
  animation-delay: calc(var(--i) * 45ms);
}

.public-animated-title .letter.space {
  width: .35em;
}

.homepage-subline,
.public-welcome-message.homepage-subline {
  margin: 0 auto 22px !important;
}

.public-welcome-message.homepage-subline span {
  display: none !important;
}

@keyframes homepageLetterIn {
  from {
    opacity: 0;
    transform: translateX(-18px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
    filter: blur(0);
  }
}

@media (max-width: 700px) {
  .public-animated-title {
    font-size: clamp(2.2rem, 12vw, 4rem) !important;
  }
}

/* ==== HOMEPAGE TITLE ONE-LINE PATCH ==== */
.public-animated-title {
  display: flex !important;
  justify-content: center !important;
  align-items: baseline !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  overflow: visible !important;
  width: 100% !important;
  max-width: 100% !important;
  font-size: clamp(2.6rem, 5.4vw, 5.3rem) !important;
  letter-spacing: -0.045em !important;
  line-height: 1.02 !important;
  margin: 24px auto 18px !important;
}

.public-animated-title .letter {
  flex: 0 0 auto !important;
}

.public-animated-title .letter.space {
  width: .28em !important;
  min-width: .28em !important;
}

@media (max-width: 900px) {
  .public-animated-title {
    font-size: clamp(2rem, 8vw, 3.4rem) !important;
    letter-spacing: -0.055em !important;
  }
}

@media (max-width: 520px) {
  .public-animated-title {
    font-size: clamp(1.65rem, 7.4vw, 2.5rem) !important;
    letter-spacing: -0.06em !important;
  }
}

/* ==== HOMEPAGE HERO FIT BOX PATCH ==== */

/* Make the public hero area/card larger so the title fits cleanly. */
.public-hero {
  width: min(1380px, calc(100vw - 56px)) !important;
}

.public-hero-card {
  width: min(1120px, 100%) !important;
  max-width: 1120px !important;
  min-height: 540px !important;
  padding: 58px 72px 56px !important;
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
}

/* Keep title inside card, one line on desktop. */
.public-animated-title {
  width: 100% !important;
  max-width: 100% !important;
  justify-content: center !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  overflow: visible !important;
  font-size: clamp(3.2rem, 5.15vw, 6.1rem) !important;
  letter-spacing: -0.055em !important;
  line-height: .98 !important;
  margin: 30px auto 24px !important;
}

.public-animated-title .letter {
  flex: 0 0 auto !important;
}

.public-animated-title .letter.space {
  width: .30em !important;
  min-width: .30em !important;
}

/* Keep text/buttons lower but inside the card. */
.public-welcome-message.homepage-subline,
.homepage-subline {
  margin: 0 auto 24px !important;
}

.public-hero-actions {
  margin-top: 0 !important;
}

/* Medium screens: slightly smaller title, still one line. */
@media (max-width: 1250px) {
  .public-hero-card {
    width: min(1000px, 100%) !important;
    padding-left: 52px !important;
    padding-right: 52px !important;
  }

  .public-animated-title {
    font-size: clamp(2.9rem, 5vw, 5.15rem) !important;
    letter-spacing: -0.06em !important;
  }
}

/* Small screens: allow safer scaling instead of overflow. */
@media (max-width: 850px) {
  .public-hero {
    width: calc(100vw - 24px) !important;
  }

  .public-hero-card {
    width: 100% !important;
    min-height: 460px !important;
    padding: 42px 22px !important;
  }

  .public-animated-title {
    font-size: clamp(2rem, 9vw, 3.6rem) !important;
    letter-spacing: -0.065em !important;
  }
}

@media (max-width: 520px) {
  .public-animated-title {
    font-size: clamp(1.55rem, 7.9vw, 2.45rem) !important;
    letter-spacing: -0.07em !important;
  }
}



/* ==== NON-LOOPING DASHBOARD SUBSCRIPTION CSS ==== */
#subscriptionCards {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 14px !important;
}

#subscriptionCards .dashboard-plan-card,
#subscriptionCards .plan-card[data-plan="paid"],
#subscriptionCards .plan-card[data-plan="premium_plus"],
#subscriptionCards .plan-card[data-plan="business"],
#subscriptionCards .plan-card[data-plan="enterprise"] {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

#subscriptionCards .plan-card[data-plan="free"] {
  display: none !important;
}

.dashboard-subscribe-btn {
  margin-top: 10px !important;
  width: 100% !important;
  pointer-events: auto !important;
}

/* ==== SIGNED HEADER DATE + CALENDAR STATUS PATCH ==== */
.workspace-topbar-right {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 14px !important;
}

.workspace-calendar-status {
  min-width: 270px;
  max-width: min(520px, 44vw);
  min-height: 58px;
  display: grid;
  align-content: center;
  justify-items: end;
  gap: 3px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 18px;
  background: rgba(10,15,25,.42);
  color: #fff;
  padding: 10px 14px;
  cursor: pointer;
  text-align: right;
}

.workspace-calendar-status:hover {
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.07);
}

.workspace-date-main {
  font-weight: 900;
  letter-spacing: .02em;
  white-space: nowrap;
}

.workspace-event-status {
  max-width: 100%;
  color: rgba(255,255,255,.68);
  font-size: .78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-event-status.event-soon {
  color: #fca5a5;
}

.workspace-event-status.event-clear {
  color: rgba(255,255,255,.62);
}

.logout-btn {
  display: none !important;
}

@media (max-width: 760px) {
  .workspace-calendar-status {
    min-width: 180px;
    max-width: 52vw;
    min-height: 52px;
    padding: 8px 10px;
  }

  .workspace-date-main {
    font-size: .85rem;
  }

  .workspace-event-status {
    font-size: .68rem;
  }
}

/* ==== MOBILE UNSIGNED HOMEPAGE CENTERING PATCH ==== */
/* Public homepage only. Does not affect signed-in workspace. */

.public-homepage {
  width: 100%;
  min-height: 100svh;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  overflow-x: hidden !important;
}

.public-nav {
  flex: 0 0 auto;
  width: min(1380px, calc(100vw - 48px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.public-hero {
  flex: 1 1 auto;
  width: min(1380px, calc(100vw - 48px)) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: grid !important;
  place-items: center !important;
}

.public-hero-card {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Tablet/mobile centering. */
@media (max-width: 900px) {
  .public-homepage {
    padding: 14px !important;
    justify-content: flex-start !important;
  }

  .public-nav {
    width: 100% !important;
    margin: 0 auto 18px !important;
  }

  .public-hero {
    width: 100% !important;
    min-height: calc(100svh - 130px) !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: grid !important;
    place-items: center !important;
  }

  .public-hero-card {
    width: min(100%, 720px) !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    transform: none !important;
  }
}

/* Phone centering. */
@media (max-width: 520px) {
  .public-homepage {
    padding: 10px !important;
  }

  .public-nav {
    min-height: 68px !important;
    border-radius: 20px !important;
    padding: 10px 12px !important;
  }

  .public-brand strong {
    font-size: .95rem !important;
  }

  .public-subscribe-btn {
    padding: 9px 12px !important;
    border-radius: 14px !important;
  }

  .public-hero {
    min-height: calc(100svh - 98px) !important;
    align-items: center !important;
    justify-items: center !important;
  }

  .public-hero-card {
    min-height: min(560px, calc(100svh - 128px)) !important;
    padding: 32px 16px !important;
    display: grid !important;
    align-content: center !important;
    justify-items: center !important;
  }

  .public-hero-actions {
    justify-content: center !important;
    width: 100% !important;
  }
}

/* ==== HOMEPAGE OAUTH REMOVAL GUARD ==== */
.public-homepage .oauth-auth-block,
.public-hero .oauth-auth-block,
.public-hero-card .oauth-auth-block {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ==== SIGNED WORKSPACE CHAT PANEL HIGHER PATCH ==== */
/* Signed-in workspace only. Keeps homepage and app functionality untouched. */

#workspaceCanvas #chatPanel.chat-panel,
body.assystem-signed-in #chatPanel.chat-panel,
body.archaos-workspace-redesigned #chatPanel.chat-panel {
  bottom: 112px !important;
  z-index: 1200 !important;
}

/* Collapsed/message-box-only state stays higher too. */
#workspaceCanvas #chatPanel.chat-panel.messagebox-only,
#workspaceCanvas #chatPanel.chat-panel.chat-collapsed,
body.assystem-signed-in #chatPanel.chat-panel.messagebox-only,
body.assystem-signed-in #chatPanel.chat-panel.chat-collapsed,
body.archaos-workspace-redesigned #chatPanel.chat-panel.messagebox-only,
body.archaos-workspace-redesigned #chatPanel.chat-panel.chat-collapsed {
  bottom: 112px !important;
  max-height: 124px !important;
  z-index: 1200 !important;
}

/* Keep bottom app buttons/dock below chat layer visually. */
.workspace-bottom-actions,
#widgetDock,
.widget-dock,
.bottom-app-dock {
  z-index: 900 !important;
}

/* Make sure the composer/send button remains clickable above the dock. */
#chatPanel .chat-composer,
#chatPanel .chat-composer-row,
#chatPanel #chatInput,
#chatPanel #chatSend,
#chatPanel #chatAttachBtn {
  pointer-events: auto !important;
  z-index: 1201 !important;
}

/* Mobile: lift it enough above bottom icons without covering too much screen. */
@media (max-width: 900px) {
  #workspaceCanvas #chatPanel.chat-panel,
  body.assystem-signed-in #chatPanel.chat-panel,
  body.archaos-workspace-redesigned #chatPanel.chat-panel {
    bottom: 104px !important;
    width: calc(100% - 22px) !important;
    max-width: calc(100% - 22px) !important;
  }
}

@media (max-width: 520px) {
  #workspaceCanvas #chatPanel.chat-panel,
  body.assystem-signed-in #chatPanel.chat-panel,
  body.archaos-workspace-redesigned #chatPanel.chat-panel {
    bottom: 96px !important;
  }
}

