/* ==========================================================================
   1Seven HQ — Official Theme & Brand Overlay for Huly Platform (v0.7+)
   Palette: Deep Ink #111113 · Warm Stone #F4F3F0 · Card White #FBFAF8
            1Seven Burgundy #8B1E2F · Hover Burgundy #A62639 · Rose #F4647A
   Typography: Bricolage Grotesque + JetBrains Mono
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..800&family=JetBrains+Mono:wght@400;500;600&display=swap');

html,
html body,
html body * {
  --font-family: "Bricolage Grotesque", "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-family-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Replace Huly default blue primary buttons with 1Seven Burgundy */
  --primary-button-color: #ffffff;
  --primary-button-content-color: rgba(255, 255, 255, 0.92);
  --primary-button-border: rgba(244, 100, 122, 0.28);
  --primary-button-outline: #f4647a;
  --primary-button-transparent: rgba(139, 30, 47, 0.24);

  --primary-button-default: #8b1e2f;
  --primary-button-hovered: #a62639;
  --primary-button-pressed: #731625;
  --primary-button-focused: #9e2236;

  --secondary-button-color: #111113;
  --secondary-button-default: #f3e4e7;
  --secondary-button-hovered: #ebd1d6;
  --secondary-button-pressed: #e0bcc3;
  --secondary-button-focused: #ebd1d6;

  --highlight-blue-01: #c9334b;
  --text-editor-selected-node-background: rgba(139, 30, 47, 0.16);
  --text-editor-selected-node-color: #f8b4be;
}

body {
  font-family: var(--font-family) !important;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Dark Theme — 1Seven Deep Ink + Burgundy / Soft Rose
   ========================================================================== */
html.theme-dark,
html .theme-dark,
html.theme-dark body * {
  --theme-bg-color: #14151a;
  --theme-back-color: #0c0d11;
  --theme-statusbar-color: #0c0d11;
  --theme-navpanel-color: #0e1015;
  --theme-navpanel-hovered: rgba(255, 255, 255, 0.045);
  --theme-navpanel-selected: rgba(139, 30, 47, 0.26);
  --theme-navpanel-border: rgba(255, 255, 255, 0.085);
  --theme-comp-header-color: #191b22;
  --theme-panel-color: #14151a;
  --theme-list-row-color: #1a1c24;
  --theme-list-subheader-color: #1f222c;
  --theme-table-header-color: #181a21;
  --theme-table-row-color: #1a1c24;
  --theme-popup-color: #1c1f29;
  --theme-popup-trans-color: #1c1f29ee;
  --theme-popup-hover: #262a37;
  --theme-popup-header: #252936;
  --theme-popup-deactivated: #14151a;
  --theme-inbox-activity-bgcolor: #0c0d11;

  --theme-link-color: #f4647a;
  --theme-editbox-focus-border: #f4647a;
  --theme-tablist-plain-color: #f4647a;
  --theme-mention-bg-color: rgba(244, 100, 122, 0.14);
  --theme-mention-focused-bg-color: rgba(244, 100, 122, 0.24);
  --theme-calendar-today-bgcolor: rgba(139, 30, 47, 0.24);
  --theme-inbox-notify: #f4647a;
  --theme-inbox-people-notify: #8b1e2f;
  --theme-inbox-people-counter-bgcolor: rgba(139, 30, 47, 0.26);

  --theme-toggle-on-bg-color: #8b1e2f;
  --theme-toggle-on-bg-hover: #a62639;

  --theme-button-attention-gradient: linear-gradient(135deg, #8b1e2f, #c9334b);
  --theme-button-attention-border: #f4647a;
  --theme-button-attention-hover-gradient: linear-gradient(135deg, #a62639, #e13b56);
  --theme-button-attention-hover-border: #f8b4be;
  --theme-button-attention-active-gradient: linear-gradient(135deg, #731625, #8b1e2f);
  --theme-button-attention-hover-shadow: 0 8px 24px rgba(139, 30, 47, 0.45);
  --theme-button-attention-active-shadow: 0 4px 12px rgba(139, 30, 47, 0.6);
  --theme-button-attention-focus-shadow: 0 0 0 3px rgba(244, 100, 122, 0.35);

  --theme-code-color: #f8b4be;
  --theme-code-bg-color: rgba(139, 30, 47, 0.2);
}

/* ==========================================================================
   Light Theme — 1Seven Warm Stone + Card White + Burgundy
   ========================================================================== */
html.theme-light,
html .theme-light,
html.theme-light body * {
  --theme-bg-color: #f4f3f0;
  --theme-back-color: #e9e8e5;
  --theme-statusbar-color: #fbfaf8;
  --theme-navpanel-color: #fbfaf8;
  --theme-navpanel-hovered: rgba(17, 17, 19, 0.04);
  --theme-navpanel-selected: rgba(139, 30, 47, 0.1);
  --theme-navpanel-border: rgba(17, 17, 19, 0.1);
  --theme-comp-header-color: #fbfaf8;
  --theme-panel-color: #f4f3f0;
  --theme-popup-color: #fbfaf8;
  --theme-list-row-color: #fbfaf8;
  --theme-table-row-color: #fbfaf8;

  --theme-link-color: #8b1e2f;
  --theme-editbox-focus-border: #8b1e2f;
  --theme-tablist-plain-color: #8b1e2f;
  --theme-mention-bg-color: rgba(139, 30, 47, 0.1);
  --theme-mention-focused-bg-color: rgba(139, 30, 47, 0.18);
  --theme-calendar-today-bgcolor: rgba(139, 30, 47, 0.12);
  --theme-inbox-notify: #8b1e2f;
  --theme-inbox-people-notify: #8b1e2f;
  --theme-toggle-on-bg-color: #8b1e2f;
  --theme-toggle-on-bg-hover: #a62639;

  --theme-button-attention-gradient: linear-gradient(135deg, #8b1e2f, #a62639);
  --theme-button-attention-border: #8b1e2f;
  --theme-button-attention-hover-gradient: linear-gradient(135deg, #a62639, #b92b43);
  --theme-button-attention-hover-border: #a62639;
}

/* ==========================================================================
   1Seven Logo & Login Screen Editorial Redesign
   ========================================================================== */
.one7-login-logo {
  height: 28px;
  width: auto;
  display: block;
  object-fit: contain;
}

.one7-hq-pill {
  font-family: var(--font-family-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(139, 30, 47, 0.36);
  border: 1px solid rgba(244, 100, 122, 0.45);
  color: #f8b4be;
  margin-left: 8px;
}

.one7-workbench-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.45rem;
  background: linear-gradient(145deg, #a62639, #631120) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(139, 30, 47, 0.42);
  overflow: hidden;
  padding: 4px;
}

.one7-workbench-mark.mini {
  width: 1.75rem;
  height: 1.75rem;
}

.one7-workbench-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* Transform Huly's blue 3D wave login background into deep 1Seven Obsidian & Burgundy */
.back-image {
  filter: hue-rotate(118deg) saturate(1.1) brightness(0.46) contrast(1.12) !important;
}

/* Replace Huly's blue login card glass + outer wrapper rim with rich 1Seven Deep Ink frosted glass */
.panel,
.panel-base,
.form-content {
  background: linear-gradient(160deg, rgba(24, 24, 28, 0.88), rgba(14, 14, 17, 0.94)) !important;
  border: 1px solid rgba(244, 100, 122, 0.22) !important;
  backdrop-filter: blur(22px) !important;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.65) !important;
}

.panel::before,
.panel::after,
.panel-base::before,
.panel-base::after {
  background: transparent !important;
}

/* Native quiet Huly-style Executive & GitLab buttons in top bar */
.one7-exec-launcher {
  position: fixed;
  top: 4px;
  right: 268px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.one7-launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.one7-launch-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.one7-launch-btn.secondary {
  background: transparent;
  border-color: transparent;
  color: rgba(255, 255, 255, 0.62);
}

.one7-launch-btn.secondary:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

/* Docked inside Huly's workbench (keeps far-left App Rail & top bar visible!) */
.one7-exec-overlay {
  position: fixed;
  top: 32px;
  left: 48px;
  right: 0;
  bottom: 0;
  z-index: 850;
  background: var(--theme-bg-color, #14151a);
  display: none;
}

.one7-exec-overlay.open {
  display: block;
}

.one7-exec-overlay iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Crisp Lucide SVG icons replacing any Huly UI emoji icons */
.one7-icon-slot {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: var(--rose, #f4647a);
  line-height: 1;
}

/* ==========================================================================
   Expanded Far-Left App Rail with Visible Names
   ========================================================================== */
.antiPanel-application.vertical {
  width: 172px !important;
  min-width: 172px !important;
  max-width: 172px !important;
  align-items: stretch !important;
}

.antiPanel-application.vertical .logo-container {
  width: 100% !important;
  padding: 6px 12px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 9px !important;
  cursor: pointer;
}

.one7-rail-brand-text {
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 600;
  color: var(--theme-caption-color, #ffffff);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.antiPanel-application.vertical .hamburger-container,
.antiPanel-application.vertical .hamburger-container > *,
.antiPanel-application.vertical .hamburger-container .scroll,
.antiPanel-application.vertical .hamburger-container .content,
.antiPanel-application.vertical .topmenu-container,
.antiPanel-application.vertical .info-box.vertical {
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  align-items: stretch !important;
}

.antiPanel-application.vertical .hamburger-container a.noBold,
.antiPanel-application.vertical .info-box.vertical a {
  width: 100% !important;
  display: block !important;
}

.antiPanel-application.vertical button.app {
  width: calc(100% - 16px) !important;
  min-width: 0 !important;
  height: 30px !important;
  margin: 1px 8px !important;
  padding: 0 10px !important;
  box-sizing: border-box !important;
  border-radius: 6px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 9px !important;
  color: rgba(255, 255, 255, 0.76) !important;
}

.antiPanel-application.vertical button.app:hover,
.antiPanel-application.vertical button.app.selected {
  color: #ffffff !important;
}

html.theme-light .antiPanel-application.vertical button.app {
  color: rgba(17, 17, 19, 0.78) !important;
}

html.theme-light .antiPanel-application.vertical button.app:hover,
html.theme-light .antiPanel-application.vertical button.app.selected {
  color: #111113 !important;
}

.antiPanel-application.vertical button.app svg,
.antiPanel-application.vertical button.app .icon {
  flex-shrink: 0 !important;
}

.one7-app-label {
  font-family: var(--font-family);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
  line-height: 1.2;
  color: inherit !important;
}

.antiPanel-application.vertical #profile-button {
  width: calc(100% - 14px) !important;
  margin: 4px 7px 6px !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 9px !important;
}

.antiPanel-application.vertical #profile-button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.one7-lucide {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}

/* Style Login / Sign Up submit button in 1Seven Burgundy */
.panel-base .antiButton.contrast,
.form-content .antiButton.contrast,
form .antiButton.contrast {
  background: #8b1e2f !important;
  color: #ffffff !important;
  border: 1px solid rgba(244, 100, 122, 0.35) !important;
}

.panel-base .antiButton.contrast:hover:not(:disabled),
.form-content .antiButton.contrast:hover:not(:disabled),
form .antiButton.contrast:hover:not(:disabled) {
  background: #a62639 !important;
}

.panel-base .antiButton.contrast:disabled,
.form-content .antiButton.contrast:disabled,
form .antiButton.contrast:disabled {
  background: rgba(139, 30, 47, 0.42) !important;
  color: rgba(255, 255, 255, 0.65) !important;
}
