/* VARIABLES */
/* ====================================================================
   cogivoice Desktop — Neumorphic Styles
   Light / Dark theme via prefers-color-scheme
   Uses CSS nesting (Electron / Chromium)
   ==================================================================== */
/* ---- Theme tokens ---- */
:root {
  /* Layout & Sizing */
  --login-buttons-accounts-dialog-width: 250px;
  --meteor-accounts-base-padding: 8px;
  --meteor-accounts-dialog-border-width: 1px;
  --configure-login-service-dialog-width: 530px;
  --button-border-radius: 4px;
  --dialog-border-radius: 8px;
  --input-border-radius: 4px;
  
  /* Colors - Primary */
  --login-buttons-color: #4e40b8;
  --login-buttons-color-active: #6c5ce7;
  
  /* Colors - Config */
  --login-buttons-config-color: #cc3a1a;
  --login-buttons-config-color-border: #a32e15;
  --login-buttons-config-color-active: #e5532e;
  --login-buttons-config-color-active-border: #cc3a1a;
  
  /* Colors - UI */
  --color-text-primary: #2d2d2d;
  --color-text-secondary: #4a4a4a;
  --color-text-disabled: #999;
  --color-background-primary: #fff;
  --color-background-secondary: #f8f9fa;
  --color-background-disabled: #e0e0e0;
  --color-border: #e6e6e6;
  --color-input-border: #d1d1d1;
  --color-input-focus-border: var(--login-buttons-color);
  --color-error: #e74c3c;
  --color-success: #2ecc71;
  --color-overlay: rgba(0, 0, 0, 0.6);
  
  /* Typography */
  --font-family-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --font-family-monospace: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
  --font-size-base: 16px;
  --font-size-small: 0.875rem;
  --font-size-smaller: 0.8125rem;
  --font-size-smallest: 0.75rem;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 600;
  --line-height-base: 1.5;
  
  /* Effects */
  --box-shadow-dialog: 0 10px 25px rgba(0, 0, 0, 0.1);
  --box-shadow-button-active: 0 2px 4px 0 rgba(0, 0, 0, 0.1) inset;
  --box-shadow-input-focus: 0 0 0 3px rgba(78, 64, 184, 0.2);
  
  /* Transitions */
  --transition-speed-fast: 0.1s;
  --transition-speed-normal: 0.2s;
  --transition-speed-slow: 0.3s;
  --transition-timing: cubic-bezier(0.25, 0.1, 0.25, 1);
  
  /* Dark Theme Variables - These can be overridden by users */
  --login-buttons-color-dark: #8c7ae6;
  --login-buttons-color-active-dark: #a29bfe;
  --color-text-primary-dark: #f5f5f5;
  --color-text-secondary-dark: #d1d1d1;
  --color-text-disabled-dark: #777;
  --color-background-primary-dark: #121212;
  --color-background-secondary-dark: #1e1e1e;
  --color-background-disabled-dark: #444;
  --color-border-dark: #333;
  --color-input-border-dark: #444;
  --color-input-focus-border-dark: var(--login-buttons-color-dark);
  --color-error-dark: #ff6b6b;
  --color-success-dark: #55efc4;
  --color-overlay-dark: rgba(0, 0, 0, 0.8);
  --box-shadow-dialog-dark: 0 10px 25px rgba(0, 0, 0, 0.3);
  --box-shadow-button-active-dark: 0 2px 4px 0 rgba(0, 0, 0, 0.3) inset;
  --box-shadow-input-focus-dark: 0 0 0 3px rgba(140, 122, 230, 0.3);
}

/* Dark Theme */
@media (prefers-color-scheme: dark) {
  :root {
    /* Colors (Dark) - Use the dark theme variables with fallbacks */
    --login-buttons-color: var(--login-buttons-color-dark, #7986CB);
    --login-buttons-color-active: var(--login-buttons-color-active-dark, #9FA8DA);
    --color-text-primary: var(--color-text-primary-dark, #eee);
    --color-text-secondary: var(--color-text-secondary-dark, #bbb);
    --color-text-disabled: var(--color-text-disabled-dark, #666);
    --color-background-primary: var(--color-background-primary-dark, #121212);
    --color-background-secondary: var(--color-background-secondary-dark, #1e1e1e);
    --color-background-disabled: var(--color-background-disabled-dark, #444);
    --color-border: var(--color-border-dark, #333);
    --color-input-border: var(--color-input-border-dark, #444);
    --color-input-focus-border: var(--color-input-focus-border-dark, var(--login-buttons-color, #7986CB));
    --color-error: var(--color-error-dark, #e57373);
    --color-success: var(--color-success-dark, #81c784);
    --color-overlay: var(--color-overlay-dark, rgba(0, 0, 0, 0.8));
    
    /* Effects (Dark) */
    --box-shadow-dialog: var(--box-shadow-dialog-dark, 0 4px 12px rgba(0, 0, 0, 0.5));
    --box-shadow-button-active: var(--box-shadow-button-active-dark, 0 2px 3px 0 rgba(0, 0, 0, 0.4) inset);
    --box-shadow-input-focus: var(--box-shadow-input-focus-dark, 0 0 0 2px rgba(121, 134, 203, 0.25));
  }
}

/* LOGIN BUTTONS */

#login-buttons {
  display: inline-block;
  line-height: 1;
}

#login-buttons .login-button {
  position: relative;
}

#login-buttons button.login-button {
  width: 100%;
}

#login-buttons .login-buttons-with-only-one-button {
  display: inline-block;
}

#login-buttons .login-buttons-with-only-one-button .login-button {
  display: inline-block;
}

#login-buttons .login-buttons-with-only-one-button .login-text-and-button {
  display: inline-block;
}

#login-buttons .login-display-name {
  display: inline-block;
  padding-right: 2px;
  line-height: var(--line-height-base);
  font-family: var(--font-family-primary);
}

#login-buttons .loading {
  line-height: 1;
  background-image: url(data:image/gif;base64,R0lGODlhEAALAPQAAP///wAAANra2tDQ0Orq6gYGBgAAAC4uLoKCgmBgYLq6uiIiIkpKSoqKimRkZL6+viYmJgQEBE5OTubm5tjY2PT09Dg4ONzc3PLy8ra2tqCgoMrKyu7u7gAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCwAAACwAAAAAEAALAAAFLSAgjmRpnqSgCuLKAq5AEIM4zDVw03ve27ifDgfkEYe04kDIDC5zrtYKRa2WQgAh+QQJCwAAACwAAAAAEAALAAAFJGBhGAVgnqhpHIeRvsDawqns0qeN5+y967tYLyicBYE7EYkYAgAh+QQJCwAAACwAAAAAEAALAAAFNiAgjothLOOIJAkiGgxjpGKiKMkbz7SN6zIawJcDwIK9W/HISxGBzdHTuBNOmcJVCyoUlk7CEAAh+QQJCwAAACwAAAAAEAALAAAFNSAgjqQIRRFUAo3jNGIkSdHqPI8Tz3V55zuaDacDyIQ+YrBH+hWPzJFzOQQaeavWi7oqnVIhACH5BAkLAAAALAAAAAAQAAsAAAUyICCOZGme1rJY5kRRk7hI0mJSVUXJtF3iOl7tltsBZsNfUegjAY3I5sgFY55KqdX1GgIAIfkECQsAAAAsAAAAABAACwAABTcgII5kaZ4kcV2EqLJipmnZhWGXaOOitm2aXQ4g7P2Ct2ER4AMul00kj5g0Al8tADY2y6C+4FIIACH5BAkLAAAALAAAAAAQAAsAAAUvICCOZGme5ERRk6iy7qpyHCVStA3gNa/7txxwlwv2isSacYUc+l4tADQGQ1mvpBAAIfkECQsAAAAsAAAAABAACwAABS8gII5kaZ7kRFGTqLLuqnIcJVK0DeA1r/u3HHCXC/aKxJpxhRz6Xi0ANAZDWa+kEAA7AAAAAAAAAAAA);
  width: 16px;
  background-position: center center;
  background-repeat: no-repeat;
}

#login-buttons .login-button, .accounts-dialog .login-button {
  cursor: pointer;
  -webkit-user-select: none; /* Safari support */
  user-select: none;
  padding: 0.625rem 1.25rem;

  font-size: var(--font-size-small);
  font-family: var(--font-family-primary);
  line-height: var(--line-height-base);
  font-weight: var(--font-weight-medium);

  text-align: center;
  color: var(--color-background-primary);

  background: var(--login-buttons-color);
  border: none;
  
  border-radius: var(--button-border-radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: background-color var(--transition-speed-normal) var(--transition-timing),
              box-shadow var(--transition-speed-normal) var(--transition-timing),
              transform var(--transition-speed-fast) var(--transition-timing);
}

#login-buttons .login-button:hover, .accounts-dialog .login-button:hover {
  background: var(--login-buttons-color-active);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

#login-buttons .login-button:active, .accounts-dialog .login-button:active {
  background: var(--login-buttons-color-active);
  transform: translateY(1px);
  box-shadow: var(--box-shadow-button-active);
}

#login-buttons .login-button.login-button-disabled,
#login-buttons .login-button.login-button-disabled:active,
.accounts-dialog .login-button.login-button-disabled,
.accounts-dialog .login-button.login-button-disabled:active {
  color: var(--color-text-disabled);
  background: var(--color-background-disabled);
  border: none;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Reset styles for dialog elements */
.accounts-dialog * {
  padding: 0;
  margin: 0;
  line-height: inherit;
  color: inherit;
  font: inherit;
  font-family: var(--font-family-primary);
}

.accounts-dialog .login-button {
  width: auto;
  margin-bottom: 4px;
}

#login-buttons .login-buttons-padding {
  display: inline-block;
  width: 30px;
}

#login-buttons .login-display-name {
  margin-right: 4px;
}

#login-buttons .configure-button {
  background: var(--login-buttons-config-color);
  border-color: var(--login-buttons-config-color-border);
}

#login-buttons .configure-button:active,
#login-buttons .configure-button:hover {
  background: var(--login-buttons-config-color-active);
  border-color: var(--login-buttons-config-color-active-border);
}

#login-buttons .login-image {
  display: inline-block;
  position: absolute;
  left: 6px;
  top: 6px;
  width: 16px;
  height: 16px;
}

#login-buttons .text-besides-image {
  margin-left: 18px;
}

#login-buttons .no-services {
  color: red;
}

#login-buttons .login-link-and-dropdown-list {
  position: relative;
}

#login-buttons .login-close-text {
  float: left;
  position: relative;
  padding-bottom: 8px;
}

#login-buttons .login-text-and-button .loading,
#login-buttons .login-link-and-dropdown-list .loading {
  display: inline-block;
}

#login-buttons.login-buttons-dropdown-align-left #login-dropdown-list .loading {
  float: right;
}

#login-buttons.login-buttons-dropdown-align-right #login-dropdown-list .loading {
  float: left;
}

#login-buttons .login-close-text-clear {
  clear: both;
}

#login-buttons .or {
  text-align: center;
}

#login-buttons .hline {
  text-decoration: line-through;
  color: lightgrey;
}

#login-buttons .or-text {
  font-weight: bold;
}

#login-buttons #signup-link {
  float: right;
}

#login-buttons #forgot-password-link,
#login-buttons #resend-passwordless-code {
  float: left;
}

#login-buttons #back-to-login-link {
  float: right;
}

#login-buttons a, .accounts-dialog a {
  cursor: pointer;
  text-decoration: none;
  color: var(--login-buttons-color);
  transition: color var(--transition-speed-normal) var(--transition-timing);
}

#login-buttons a:hover, .accounts-dialog a:hover {
  color: var(--login-buttons-color-active);
  text-decoration: underline;
}

#login-buttons.login-buttons-dropdown-align-right .login-close-text {
  float: right;
}

.accounts-dialog {
  border: var(--meteor-accounts-dialog-border-width) solid var(--color-border);
  z-index: 1000;
  background: var(--color-background-primary);
  border-radius: var(--dialog-border-radius);

  padding: 24px;
  margin: -8px -12px 0 -12px;

  width: var(--login-buttons-accounts-dialog-width);

  box-shadow: var(--box-shadow-dialog);

  font-size: var(--font-size-base);
  color: var(--color-text-primary);
}

.accounts-dialog > * {
  line-height: 1.6;
}

.accounts-dialog > .login-close-text {
  line-height: inherit;
  font-size: inherit;
  font-family: inherit;
}

.accounts-dialog label, .accounts-dialog .title {
  font-size: var(--font-size-small);
  margin-top: 1rem;
  margin-bottom: 0.375rem;
  display: block;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  letter-spacing: 0.01em;
}

.accounts-dialog input[type=text],
.accounts-dialog input[type=email],
.accounts-dialog input[type=password] {
  box-sizing: border-box;
  width: 100%;
  height: auto;
  font-size: 1rem;
  padding: 0.5rem;
  border-radius: 4px;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

#login-buttons input[type=text]:focus,
#login-buttons input[type=email]:focus,
#login-buttons input[type=password]:focus,
.accounts-dialog input[type=text]:focus,
.accounts-dialog input[type=email]:focus,
.accounts-dialog input[type=password]:focus {
  outline: none;
  border-color: var(--color-input-focus-border);
  box-shadow: var(--box-shadow-input-focus);
}

.accounts-dialog .login-button-form-submit {
  margin-top: 8px;
}

.accounts-dialog .message {
  font-size: var(--font-size-smaller);
  margin-top: 10px;
  line-height: 1.4;
  padding: 0.375rem 0;
}

.accounts-dialog .error-message {
  color: var(--color-error);
  padding: 0.375rem 0.625rem;
  background-color: rgba(231, 76, 60, 0.1);
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.accounts-dialog .info-message {
  color: var(--color-success);
  padding: 0.375rem 0.625rem;
  background-color: rgba(46, 204, 113, 0.1);
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.accounts-dialog .additional-link {
  font-size: var(--font-size-smallest);
  margin-top: 1rem;
  display: inline-block;
}

.accounts-dialog .accounts-close {
  position: absolute;
  top: 12px;
  right: 16px;

  font-size: 18px;
  font-weight: var(--font-weight-bold);
  line-height: 18px;
  text-decoration: none;
  color: var(--color-text-secondary);
  opacity: 0.6;
  transition: opacity var(--transition-speed-normal) var(--transition-timing);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.accounts-dialog .accounts-close:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.05);
}

.accounts-dialog #login-buttons-cancel-reset-password {
  float: right;
}

.accounts-dialog #login-buttons-cancel-enroll-account {
  float: right;
}

#login-dropdown-list {
  position: absolute;
  top: calc(-1 * var(--meteor-accounts-dialog-border-width));
  left: calc(-1 * var(--meteor-accounts-dialog-border-width));
}

#login-buttons.login-buttons-dropdown-align-right #login-dropdown-list {
  left: auto;
  right: calc(-1 * var(--meteor-accounts-dialog-border-width));
}

#login-buttons-message-dialog .message {
  /* we intentionally want it bigger on this dialog since it's the only thing displayed */
  font-size: 100%;
}

.accounts-centered-dialog {
  font-family: var(--font-family-primary);

  z-index: 1001;
  position: fixed;
  
  /* Modern centering approach using transform */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: var(--login-buttons-accounts-dialog-width);
}

#configure-login-service-dialog {
  width: var(--configure-login-service-dialog-width);
  /* Using transform for centering instead of negative margins */
}

#configure-login-service-dialog table {
  width: 100%;
}

#configure-login-service-dialog input[type=text] {
  width: 100%;
  font-family: var(--font-family-monospace);
}

#configure-login-service-dialog ol {
  margin-top: 10px;
  margin-bottom: 10px;
}

#configure-login-service-dialog ol li {
  margin-left: 30px;
}

#configure-login-service-dialog .configuration_labels {
  width: 30%;
}

#configure-login-service-dialog .configuration_inputs {
  width: 70%;
}

#configure-login-service-dialog .new-section {
  margin-top: 10px;
}

#configure-login-service-dialog .url {
  font-family: var(--font-family-monospace);
}

#configure-login-service-dialog-save-configuration {
  float: right;
}

.configure-login-service-dismiss-button {
  float: left;
}

#just-verified-dismiss-button, #messages-dialog-dismiss-button {
  margin-top: 8px;
}

.hide-background {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  background-color: var(--color-overlay);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

#login-buttons input[type=text],
#login-buttons input[type=email],
#login-buttons input[type=password],
.accounts-dialog input[type=text],
.accounts-dialog input[type=email],
.accounts-dialog input[type=password] {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--color-input-border);
  border-radius: var(--input-border-radius);
  line-height: var(--line-height-base);
  font-size: var(--font-size-base);
  color: var(--color-text-primary);
  background-color: var(--color-background-primary);
  width: 100%;
  box-sizing: border-box;
  transition: border-color var(--transition-speed-normal) var(--transition-timing),
              box-shadow var(--transition-speed-normal) var(--transition-timing);
}/* Import the CSS from accounts-ui-unstyled */
@import url("{accounts-ui-unstyled}/login_buttons.import.css");
html {
  zoom: 1;
}

:root {
  /* ---- Cupertino theme — light ---- */
  --color-bg: #f5f5f7;
  --color-surface: #ffffff;
  --color-primary: #0071e3;
  --color-primary-alt: #0066cc;
  --login-buttons-color: #0071e3;
  --login-buttons-color-active: #0066cc;
  --login-buttons-color-dark: #0a84ff;
  --login-buttons-color-active-dark: #53a7ff;
  --color-accent: #ff3b30;
  --color-success: #28a745;
  --color-warning: #b07700;
  --color-text: #1d1d1f;
  --color-text-dim: #6e6e73;
  --color-input-bg: #ffffff;
  --shadow-light: transparent;
  --shadow-dark: transparent;
  --shadow-light-s: transparent;
  --shadow-dark-s: transparent;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --font-main: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: "SF Mono", Menlo, Consolas, monospace;
  --cv-divider-color: #d2d2d7;
  --cv-card-shadow: 0 1px 2px rgba(0,0,0,.04), 0 0 0 0.5px rgba(0,0,0,.06);
  --cv-tab-active-bg: #ffffff;
  --cv-tab-active-shadow: 0 1px 2px rgba(0,0,0,.06), 0 0 0 0.5px rgba(0,0,0,.05);
  --cv-input-border: 1px solid #d2d2d7;
  --cv-pill-bg: rgba(0,0,0,0.04);
  --cv-status-bg: rgba(40,167,69,0.12);
  --cv-status-text: #28a745;
  --cv-danger-bg: rgba(255,59,48,0.12);
  --cv-focus-ring: 0 0 0 4px rgba(0,113,227,.2);
  --cv-tag-alt-bg: rgba(255,179,0,0.15);
  --cv-tag-alt-fg: #b07700;
  --cv-bar-bg: #d2d2d7;
  --cv-pad-front-header-bg: rgba(0,113,227,.08);
  --cv-pad-front-header-border: rgba(0,113,227,.16);
  --cv-pad-inactive-traffic-bg: #d7dbe2;
  --cv-pad-inactive-traffic-border: rgba(0,0,0,.08);
  --cv-pad-active-traffic-bg: #ff5f57;
  --cv-pad-active-traffic-border: rgba(0,0,0,.15);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1c1c1e;
    --color-surface: #2c2c2e;
    --color-primary: #0a84ff;
    --color-primary-alt: #0974e0;
    --login-buttons-color: #0a84ff;
    --login-buttons-color-active: #53a7ff;
    --login-buttons-color-dark: #0a84ff;
    --login-buttons-color-active-dark: #53a7ff;
    --color-accent: #ff453a;
    --color-success: #30d158;
    --color-warning: #ff9f0a;
    --color-text: #f5f5f7;
    --color-text-dim: #98989d;
    --color-input-bg: #2c2c2e;
    --cv-divider-color: #3a3a3c;
    --cv-card-shadow: 0 1px 2px rgba(0,0,0,.3);
    --cv-tab-active-bg: #48484a;
    --cv-tab-active-shadow: 0 1px 2px rgba(0,0,0,.2);
    --cv-input-border: 1px solid #3a3a3c;
    --cv-pill-bg: rgba(255,255,255,0.08);
    --cv-status-bg: rgba(48,209,88,0.18);
    --cv-status-text: #30d158;
    --cv-danger-bg: rgba(255,69,58,0.18);
    --cv-focus-ring: 0 0 0 4px rgba(10,132,255,.25);
    --cv-tag-alt-bg: rgba(255,159,10,0.18);
    --cv-tag-alt-fg: #ff9f0a;
    --cv-bar-bg: #48484a;
    --cv-pad-front-header-bg: rgba(10,132,255,.18);
    --cv-pad-front-header-border: rgba(10,132,255,.28);
    --cv-pad-inactive-traffic-bg: #8b8e96;
    --cv-pad-inactive-traffic-border: rgba(255,255,255,.12);
    --cv-pad-active-traffic-bg: #ff5f57;
    --cv-pad-active-traffic-border: rgba(0,0,0,.18);
  }
}
:root[data-theme=light] {
  --color-bg: #f5f5f7;
  --color-surface: #ffffff;
  --color-primary: #0071e3;
  --color-primary-alt: #0066cc;
  --login-buttons-color: #0071e3;
  --login-buttons-color-active: #0066cc;
  --login-buttons-color-dark: #0a84ff;
  --login-buttons-color-active-dark: #53a7ff;
  --color-accent: #ff3b30;
  --color-success: #28a745;
  --color-warning: #b07700;
  --color-text: #1d1d1f;
  --color-text-dim: #6e6e73;
  --color-input-bg: #ffffff;
  --cv-divider-color: #d2d2d7;
  --cv-card-shadow: 0 1px 2px rgba(0,0,0,.04), 0 0 0 0.5px rgba(0,0,0,.06);
  --cv-tab-active-bg: #ffffff;
  --cv-tab-active-shadow: 0 1px 2px rgba(0,0,0,.06), 0 0 0 0.5px rgba(0,0,0,.05);
  --cv-input-border: 1px solid #d2d2d7;
  --cv-pill-bg: rgba(0,0,0,0.04);
  --cv-status-bg: rgba(40,167,69,0.12);
  --cv-status-text: #28a745;
  --cv-danger-bg: rgba(255,59,48,0.12);
  --cv-focus-ring: 0 0 0 4px rgba(0,113,227,.2);
  --cv-tag-alt-bg: rgba(255,179,0,0.15);
  --cv-tag-alt-fg: #b07700;
  --cv-bar-bg: #d2d2d7;
  --cv-pad-front-header-bg: rgba(0,113,227,.08);
  --cv-pad-front-header-border: rgba(0,113,227,.16);
  --cv-pad-inactive-traffic-bg: #d7dbe2;
  --cv-pad-inactive-traffic-border: rgba(0,0,0,.08);
  --cv-pad-active-traffic-bg: #ff5f57;
  --cv-pad-active-traffic-border: rgba(0,0,0,.15);
}

:root[data-theme=dark] {
  --color-bg: #1c1c1e;
  --color-surface: #2c2c2e;
  --color-primary: #0a84ff;
  --color-primary-alt: #0974e0;
  --login-buttons-color: #0a84ff;
  --login-buttons-color-active: #53a7ff;
  --login-buttons-color-dark: #0a84ff;
  --login-buttons-color-active-dark: #53a7ff;
  --color-accent: #ff453a;
  --color-success: #30d158;
  --color-warning: #ff9f0a;
  --color-text: #f5f5f7;
  --color-text-dim: #98989d;
  --color-input-bg: #2c2c2e;
  --cv-divider-color: #3a3a3c;
  --cv-card-shadow: 0 1px 2px rgba(0,0,0,.3);
  --cv-tab-active-bg: #48484a;
  --cv-tab-active-shadow: 0 1px 2px rgba(0,0,0,.2);
  --cv-input-border: 1px solid #3a3a3c;
  --cv-pill-bg: rgba(255,255,255,0.08);
  --cv-status-bg: rgba(48,209,88,0.18);
  --cv-status-text: #30d158;
  --cv-danger-bg: rgba(255,69,58,0.18);
  --cv-focus-ring: 0 0 0 4px rgba(10,132,255,.25);
  --cv-tag-alt-bg: rgba(255,159,10,0.18);
  --cv-tag-alt-fg: #ff9f0a;
  --cv-bar-bg: #48484a;
  --cv-pad-front-header-bg: rgba(10,132,255,.18);
  --cv-pad-front-header-border: rgba(10,132,255,.28);
  --cv-pad-inactive-traffic-bg: #8b8e96;
  --cv-pad-inactive-traffic-border: rgba(255,255,255,.12);
  --cv-pad-active-traffic-bg: #ff5f57;
  --cv-pad-active-traffic-border: rgba(0,0,0,.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 50px 0 32px;
}
body.log-panel-open {
  padding-bottom: 252px; /* footer 32px + panel 220px */
}
body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  user-select: none;
}

input[type=color] {
  width: 2.2rem !important;
  min-width: 2.2rem !important;
  max-width: 2.2rem !important;
  padding: 0;
}

input[type=number] {
  max-width: 4.2rem !important;
}

/* ---- Header ---- */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: "brand toolbar status";
  align-items: center;
  gap: 12px 18px;
  padding: 14px 24px;
  background: var(--color-bg);
  /* box-shadow:
    0 4px 8px var(--shadow-dark-s),
    0 -2px 6px var(--shadow-light-s); */
}
.app-header h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0.03rem;
  color: var(--color-primary);
}
.app-header > * {
  min-width: 0;
}
.app-header .app-header_brand {
  grid-area: brand;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px 18px;
}
.app-header .header-status {
  grid-area: status;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 12px;
  -webkit-app-region: no-drag;
}
.app-header .startup-status {
  font-size: 0.72rem;
  color: var(--color-text-dim);
  font-style: italic;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: opacity 0.3s;
}
.app-header .startup-status.active {
  color: var(--color-warning);
}
.app-header .backend-status {
  font-size: 0rem;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  box-shadow: 3px 3px 6px var(--shadow-dark-s), -3px -3px 6px var(--shadow-light-s);
}
.app-header .backend-status.online {
  color: var(--color-success);
}
.app-header .backend-status.offline {
  color: var(--color-accent);
}
.app-header .hub-status {
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  color: var(--color-text-dim);
  box-shadow: 3px 3px 6px var(--shadow-dark-s), -3px -3px 6px var(--shadow-light-s);
}
.app-header .hub-status.connected {
  color: var(--color-success);
}
.app-header .hub-status.disconnected {
  color: var(--color-accent);
}
.app-header .hub-status:empty {
  display: none;
}
.app-header .btn-cogs {
  flex: 0 0 auto;
  -webkit-app-region: no-drag;
  background: var(--color-bg);
  color: var(--color-text-dim);
  border: none;
  padding: 6px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, box-shadow 0.2s, transform 0.1s;
  box-shadow: 3px 3px 6px var(--shadow-dark-s), -3px -3px 6px var(--shadow-light-s);
}
.app-header .btn-cogs:hover {
  color: var(--color-primary);
}
.app-header .btn-cogs.est_actif {
  color: var(--color-primary);
  box-shadow: inset 2px 2px 4px var(--shadow-dark-s), inset -2px -2px 4px var(--shadow-light-s);
}
.app-header .btn-cogs:active {
  transform: scale(0.95);
  box-shadow: inset 2px 2px 4px var(--shadow-dark-s), inset -2px -2px 4px var(--shadow-light-s);
}
.app-header .btn-cogs i {
  font-size: 0.95rem;
  line-height: 1;
}
.app-header .header-column-toggle.js_header_inspecteur_toggle i {
  transform: scaleX(-1);
}

/* ---- Navigation ---- */
.app-nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  background: transparent;
}
.app-nav .nav-btn {
  padding: 10px 16px;
  border: none;
  background: var(--color-bg);
  color: var(--color-text-dim);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color 0.2s, box-shadow 0.2s;
  box-shadow: 3px 3px 6px var(--shadow-dark-s), -3px -3px 6px var(--shadow-light-s);
}
.app-nav .nav-btn:hover {
  color: var(--color-text);
}
.app-nav .nav-btn.active {
  color: var(--color-primary);
  box-shadow: inset 3px 3px 6px var(--shadow-dark-s), inset -3px -3px 6px var(--shadow-light-s);
}
.app-nav .nav-btn_project {
  flex: 0 1 auto;
  max-width: 250px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ui-control-group {
  --ui-control-group-gap: clamp(0.5rem, 0.9vw, 0.85rem);
  --ui-control-group-justify: center;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  align-content: flex-start;
  justify-content: var(--ui-control-group-justify);
  gap: var(--ui-control-group-gap);
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}

.ui-control-group > * {
  flex: 0 1 auto;
  min-width: max-content;
  max-width: 100%;
}

.header-scene-toolbar {
  grid-area: toolbar;
  position: static;
  width: auto;
  max-width: 100%;
  min-width: 0;
  display: flex;
  justify-content: center;
  justify-self: center;
  pointer-events: auto;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.header-scene-toolbar_group {
  --ui-control-group-gap: clamp(0.45rem, 0.85vw, 0.8rem);
  flex-wrap: nowrap;
  width: max-content;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--cv-divider-color);
  border-radius: var(--radius-pill);
  background: var(--color-surface);
  box-shadow: var(--cv-card-shadow);
}

.header-scene-toolbar_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 0.85rem;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-dim);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}
.header-scene-toolbar_button:hover {
  background: var(--cv-pill-bg);
  color: var(--color-text);
}
.header-scene-toolbar_button:active:not(:disabled) {
  transform: translateY(1px);
}
.header-scene-toolbar_button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}
.header-scene-toolbar_button i {
  font-size: 1rem;
  line-height: 1;
}
.header-scene-toolbar_button span {
  white-space: nowrap;
}

.header-scene-toolbar_action-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.16rem;
  min-width: max-content;
  border-radius: var(--radius-pill);
}

.header-scene-toolbar_action-label {
  display: inline-flex;
  align-items: center;
  padding: 0 0.24rem 0 0.5rem;
  white-space: nowrap;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1;
}

.header-scene-toolbar_icon-button {
  width: 2.35rem;
  min-width: 2.35rem;
  padding-inline: 0;
  gap: 0;
}

.header-scene-toolbar_button--play {
  color: rgb(74, 144, 226);
}
.header-scene-toolbar_button--play:hover {
  color: rgb(74, 144, 226);
  background: color-mix(in srgb, rgb(74, 144, 226) 14%, transparent);
}

.header-scene-toolbar_action-group--publish .header-scene-toolbar_action-label {
  color: rgb(109, 200, 109);
}

.header-scene-toolbar_button--publish {
  color: rgb(109, 200, 109);
}
.header-scene-toolbar_button--publish:hover {
  color: rgb(109, 200, 109);
  background: color-mix(in srgb, rgb(109, 200, 109) 14%, transparent);
}

.header-scene-toolbar_action-group--test .header-scene-toolbar_action-label {
  color: rgb(242, 142, 43);
}

.header-scene-toolbar_button--test {
  color: rgb(242, 142, 43);
}
.header-scene-toolbar_button--test:hover {
  color: rgb(242, 142, 43);
  background: color-mix(in srgb, rgb(242, 142, 43) 14%, transparent);
}

.header-scene-toolbar_button--import-export {
  color: var(--color-text-dim);
}
.header-scene-toolbar_button--import-export:hover {
  color: var(--color-text);
}

.header-scene-toolbar_button--stop {
  color: color(srgb 0.985 0.245 0.197);
}
.header-scene-toolbar_button--stop:hover {
  color: color(srgb 0.985 0.245 0.197);
  background: color-mix(in srgb, color(srgb 0.985 0.245 0.197) 14%, transparent);
}

.header-scene-publication-progress {
  width: min(32rem, calc(100vw - 2rem));
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--cv-divider-color);
  border-radius: 0.75rem;
  background: var(--color-surface);
  box-shadow: var(--cv-card-shadow);
}
.header-scene-publication-progress_text {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--color-text);
}
.header-scene-publication-progress_text small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--color-text-dim);
}
.header-scene-publication-progress_track {
  height: 0.28rem;
  margin-top: 0.28rem;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--color-text-dim) 16%, transparent);
}
.header-scene-publication-progress_track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: rgb(10, 132, 255);
  transition: width 0.35s ease;
}
.header-scene-publication-progress.is-succes .header-scene-publication-progress_track span {
  background: rgb(52, 199, 89);
}
.header-scene-publication-progress.is-erreur .header-scene-publication-progress_track span {
  background: rgb(255, 69, 58);
}

.progress-percent {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--color-text-dim);
  white-space: nowrap;
}

.header-projects-menu {
  flex: 0 1 auto;
  min-width: 0;
  position: relative;
}

.header-logo-menu {
  flex: 0 0 auto;
  position: relative;
}

.header-import-export-menu {
  position: relative;
  display: inline-flex;
}

.header-projects-dropdown {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  min-width: min(360px, 82vw);
  max-width: min(420px, 88vw);
  padding: 0.3rem;
  margin: 0;
  z-index: 1250;
  background: var(--color-surface);
  border: 1px solid var(--cv-divider-color);
  border-radius: 10px;
  box-shadow: var(--cv-card-shadow);
}

.header-projects-dropdown_section {
  padding: 0.55rem 0.65rem 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-dim);
}

.header-projects-dropdown_item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-dim);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  text-align: left;
  padding: 0.48rem 0.65rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  gap: 0.55rem;
}
.header-projects-dropdown_item:hover {
  background: var(--cv-pill-bg);
  color: var(--color-text);
}
.header-projects-dropdown_item i {
  width: 1.1rem;
  text-align: center;
}

.header-import-export-dropdown {
  left: auto;
  right: 0;
  min-width: min(260px, 82vw);
}

.header-import-export-progress {
  width: min(360px, 88vw);
}

.project-import-dialog {
  width: min(620px, 92vw);
  padding: 1.15rem;
}

.project-import-dialog_title {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
}

.project-import-dialog_text {
  margin: 0 0 1rem;
  color: var(--color-text-dim);
  font-size: 0.92rem;
}

.project-import-dialog_choices {
  display: grid;
  gap: 0.65rem;
}

.project-import-dialog_choice {
  width: 100%;
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem;
  border: 1px solid var(--cv-divider-color);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.project-import-dialog_choice:hover {
  border-color: var(--color-primary);
  background: var(--cv-pill-bg);
}
.project-import-dialog_choice:active {
  transform: translateY(1px);
}
.project-import-dialog_choice i {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--cv-pill-bg);
  color: var(--color-primary);
}
.project-import-dialog_choice strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.92rem;
}
.project-import-dialog_choice small {
  display: block;
  color: var(--color-text-dim);
  font-size: 0.8rem;
  line-height: 1.35;
}

.project-import-dialog_actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.project-import-dialog_project_grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.7rem;
  max-height: min(420px, 48vh);
  overflow: auto;
  padding: 0.1rem;
}

.project-import-dialog_project {
  min-width: 0;
  padding: 0.55rem;
  border: 1px solid var(--cv-divider-color);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.project-import-dialog_project:hover, .project-import-dialog_project.is-selected {
  border-color: var(--color-primary);
  background: var(--cv-pill-bg);
}
.project-import-dialog_project:active {
  transform: translateY(1px);
}

.project-import-dialog_project_thumb {
  width: 100%;
  aspect-ratio: 1.25;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  overflow: hidden;
  background: var(--cv-pill-bg);
  color: var(--color-text-dim);
  font-size: 0.78rem;
  text-align: center;
}
.project-import-dialog_project_thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-import-dialog_project_name {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.84rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-import-dialog_empty {
  margin: 0;
  padding: 0.9rem;
  border: 1px solid var(--cv-divider-color);
  border-radius: 8px;
  color: var(--color-text-dim);
  background: var(--cv-pill-bg);
}

.project-import-dialog_confirm {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.8rem;
  padding: 0.9rem;
  border: 1px solid color-mix(in srgb, var(--color-accent) 42%, var(--cv-divider-color));
  border-radius: 8px;
  background: var(--cv-danger-bg);
}

.project-import-dialog_confirm_icon {
  width: 2.4rem;
  height: 2.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--color-accent);
  background: color-mix(in srgb, var(--color-accent) 14%, transparent);
}

.project-import-dialog_confirm_title {
  margin: 0 0 0.25rem;
  font-weight: 750;
}

.header-projects-dropdown_item_project {
  gap: 0.7rem;
}

.header-projects-dropdown_thumb {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--cv-pill-bg);
}
.header-projects-dropdown_thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.header-projects-dropdown_thumb svg {
  display: block;
}

.header-projects-dropdown_thumb_placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0.2rem;
  font-size: 0.45rem;
  line-height: 1.05;
  font-weight: 700;
  text-align: center;
  color: var(--color-text-dim);
}

.header-projects-dropdown_label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Main ---- */
.app-body {
  display: flex;
  flex-direction: column;
}

.app-main {
  margin: 0;
  padding: 24px;
  width: 100%;
  margin-inline: auto;
}

.history-sidebar {
  display: none;
  padding: 24px;
}

body[data-tab=history] .app-main {
  display: none;
}

body[data-tab=history] .history-sidebar {
  display: block;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 1024px) {
  .app-body {
    flex-direction: row;
    align-items: flex-start;
  }
  .app-main {
    flex: 3 1 0;
    min-width: 0;
    max-width: none;
    margin: 0;
  }
  .history-sidebar {
    display: block;
    flex: 2 0 300px;
    max-width: 520px;
    position: sticky;
    top: 24px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    border-left: 1px solid var(--shadow-dark-s);
  }
  .nav-btn[data-tab=history] {
    display: none;
  }
  body[data-tab=history] .app-main {
    display: block;
  }
}
/* ---- Shared form components ---- */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.83rem;
  color: var(--color-text-dim);
  font-weight: 600;
}

.form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.form-row .form-group {
  flex: 1;
  min-width: 140px;
}

input[type=text],
input[type=number],
select,
textarea {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-input-bg);
  color: var(--color-text);
  font-size: 0.9rem;
  font-family: var(--font-main);
  outline: none;
  transition: box-shadow 0.25s;
  box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
}
input[type=text]:focus,
input[type=number]:focus,
select:focus,
textarea:focus {
  box-shadow: inset 3px 3px 8px var(--shadow-dark), inset -3px -3px 8px var(--shadow-light), 0 0 0 2px var(--color-primary);
}

textarea {
  resize: vertical;
  min-height: 80px;
  font-family: var(--font-main);
  user-select: text;
}

input[type=text],
input[type=number] {
  user-select: text;
}

/* ---- Buttons ---- */
.btn {
  padding: 9px 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--color-bg);
  color: var(--color-text);
  transition: box-shadow 0.2s, transform 0.1s, color 0.2s;
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}
.btn:hover:not(:disabled) {
  box-shadow: 5px 5px 10px var(--shadow-dark), -5px -5px 10px var(--shadow-light);
}
.btn:active:not(:disabled) {
  box-shadow: inset 3px 3px 6px var(--shadow-dark), inset -3px -3px 6px var(--shadow-light);
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn.btn-primary {
  color: var(--color-primary);
}
.btn.btn-primary:hover:not(:disabled) {
  color: var(--color-primary-alt);
}
.btn.btn-danger {
  color: var(--color-accent);
}
.btn.btn-secondary {
  color: var(--color-text-dim);
}
.btn.btn-sm {
  padding: 5px 14px;
  font-size: 0.8rem;
}

/* ---- Cards ---- */
.card {
  background: var(--color-surface);
  border: none;
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
}

/* ---- Audio player ---- */
audio {
  width: 100%;
  margin-top: 8px;
  border-radius: var(--radius-sm);
}

/* ---- Module sections ---- */
.module-title {
  font-size: 1.1rem;
  margin: 0 0 16px;
  color: var(--color-primary);
  font-weight: 700;
}

/* ---- Utility ---- */
.text-dim {
  color: var(--color-text-dim);
}

.text-small {
  font-size: 0.8rem;
}

.text-medium {
  font-size: 0.9rem;
}

.module-title,
.text-dim,
.text-small,
.form-group label,
.checkbox-label,
.upload-progress-label,
.data-folder-label,
.pager .pager-info,
.generating-label,
.app-header .startup-status,
.app-header .backend-status,
.app-header .hub-status,
details summary {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-16 {
  margin-bottom: 16px;
}

.flex-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 2px 2px 4px var(--shadow-dark-s), -2px -2px 4px var(--shadow-light-s);
}
.badge.badge-mode {
  color: var(--color-primary);
}
.badge.badge-seed {
  color: var(--color-warning);
}
.badge.badge-seed-copy {
  border: none;
  background: transparent;
  font: inherit;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  font-size: 0.7rem;
  font-weight: bold;
}
.badge.badge-seed-copy:hover {
  opacity: 0.75;
}
.badge.badge-seed-copy:active {
  transform: scale(0.95);
}
.badge.badge-status {
  position: absolute;
  top: 10px;
  right: 12px;
}
.badge.badge-status-pending {
  color: #fff;
  background: var(--color-warning);
}
.badge.badge-status-running {
  color: #fff;
  background: var(--color-primary);
  animation: badge-pulse 1.4s ease-in-out infinite;
}
.badge.badge-status-warming {
  color: #fff;
  background: var(--color-accent);
  animation: badge-pulse 1.4s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}
/* ---- Spinner ---- */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2.5px solid var(--color-text-dim);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* ---- Slider (range) — neumorphic track ---- */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: var(--color-bg);
  outline: none;
  box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light);
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-bg);
  cursor: pointer;
  box-shadow: 3px 3px 6px var(--shadow-dark), -3px -3px 6px var(--shadow-light);
}

.range-value {
  font-size: 0.8rem;
  color: var(--color-text-dim);
  font-family: var(--font-mono);
}

/* ---- Seed / Variante row ---- */
.seed-row select {
  flex: 0 0 auto;
  width: auto;
  min-width: 130px;
}
.seed-row input[type=number] {
  flex: 1;
  min-width: 180px;
}

.voice-manager-title {
  margin: 0 0 0.55rem;
  font-size: 1rem;
  color: var(--color-primary);
}

.voice-sharing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.voice-sharing-column {
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  box-shadow: inset 2px 2px 5px var(--shadow-dark-s), inset -2px -2px 5px var(--shadow-light-s);
}

.voice-sharing-title {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text-dim);
}

.voice-sharing-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
  font-size: 0.84rem;
  color: var(--color-text);
  cursor: pointer;
  user-select: none;
}
.voice-sharing-option:last-child {
  margin-bottom: 0;
}
.voice-sharing-option input {
  margin-top: 0.15rem;
}

.cogi_switch {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  user-select: none;
}
.cogi_switch input[type=checkbox] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cogi_switch_track {
  position: relative;
  flex: 0 0 auto;
  width: 2.6rem;
  height: 1.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-surface, white) 70%, black 8%);
  border: 1px solid color-mix(in srgb, var(--color-text, #222) 12%, transparent);
  transition: background 0.18s ease, border-color 0.18s ease;
}
.cogi_switch_track::after {
  content: "";
  position: absolute;
  top: 0.12rem;
  left: 0.12rem;
  width: 1.18rem;
  height: 1.18rem;
  border-radius: 50%;
  background: var(--color-surface, white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.24);
  transition: transform 0.18s ease;
}
.cogi_switch input[type=checkbox]:focus-visible + .cogi_switch_track {
  outline: 2px solid color-mix(in srgb, var(--color-primary, #1185c8) 45%, transparent);
  outline-offset: 2px;
}
.cogi_switch input[type=checkbox]:checked + .cogi_switch_track {
  background: color-mix(in srgb, var(--color-primary, #1185c8) 82%, white);
  border-color: color-mix(in srgb, var(--color-primary, #1185c8) 74%, transparent);
}
.cogi_switch input[type=checkbox]:checked + .cogi_switch_track::after {
  transform: translateX(1rem);
}
.cogi_switch input[type=checkbox]:disabled + .cogi_switch_track,
.cogi_switch input[type=checkbox]:disabled ~ span:not(.cogi_switch_track) {
  opacity: 0.6;
  cursor: not-allowed;
}

.voice-sharing-empty {
  margin: 0;
  font-size: 0.8rem;
  color: var(--color-text-dim);
  font-style: italic;
}

@media (max-width: 760px) {
  .voice-sharing-grid {
    grid-template-columns: 1fr;
  }
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-card {
  width: min(480px, 90vw);
  margin: 0;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  margin-top: 1rem;
}
.modal-actions > .btn,
.modal-actions > button {
  flex: 0 0 auto;
}

.hub-login-panel {
  padding: 24px;
}

.hub-login-card {
  width: min(720px, 94vw);
  padding: 28px 30px 30px;
}

.hub-login-buttons {
  margin-top: 16px;
}
.hub-login-buttons #login-buttons, .hub-login-buttons .login-link-and-dropdown-list, .hub-login-buttons .login-buttons-with-only-one-button, .hub-login-buttons .login-text-and-button {
  display: block;
  width: 100%;
}
.hub-login-buttons #login-sign-in-link, .hub-login-buttons #login-name-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.hub-login-buttons #login-dropdown-list {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  width: 100%;
  max-width: none;
  margin: 14px 0 0;
}

.accounts-dialog:not(#configure-login-service-dialog) {
  box-sizing: border-box;
  max-width: calc(100vw - 24px);
}

.accounts-centered-dialog:not(#configure-login-service-dialog) {
  width: min(92vw, 560px);
}

.hub-login-buttons .accounts-dialog,
.accounts-centered-dialog:not(#configure-login-service-dialog) {
  margin: 0;
  padding: 22px 24px;
  border-color: var(--cv-divider-color);
  background: var(--color-surface);
  box-shadow: var(--cv-card-shadow);
}

.hub-login-buttons .accounts-dialog {
  width: 100%;
}

.hub-login-buttons .accounts-dialog label,
.accounts-centered-dialog:not(#configure-login-service-dialog) label {
  color: var(--color-text-dim);
  font-size: 0.82rem;
  font-weight: 600;
}

.hub-login-buttons .accounts-dialog input[type=text],
.hub-login-buttons .accounts-dialog input[type=email],
.hub-login-buttons .accounts-dialog input[type=password],
.accounts-centered-dialog:not(#configure-login-service-dialog) input[type=text],
.accounts-centered-dialog:not(#configure-login-service-dialog) input[type=email],
.accounts-centered-dialog:not(#configure-login-service-dialog) input[type=password] {
  min-height: 42px;
  padding: 10px 12px;
  border: var(--cv-input-border);
  border-radius: 8px;
  background: var(--color-input-bg);
  color: var(--color-text);
  box-shadow: none;
}

.hub-login-buttons .accounts-dialog input[type=text]:focus,
.hub-login-buttons .accounts-dialog input[type=email]:focus,
.hub-login-buttons .accounts-dialog input[type=password]:focus,
.accounts-centered-dialog:not(#configure-login-service-dialog) input[type=text]:focus,
.accounts-centered-dialog:not(#configure-login-service-dialog) input[type=email]:focus,
.accounts-centered-dialog:not(#configure-login-service-dialog) input[type=password]:focus {
  border-color: var(--color-primary);
  box-shadow: var(--cv-focus-ring);
}

.hub-login-buttons .additional-link-container,
.accounts-centered-dialog:not(#configure-login-service-dialog) .additional-link-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.login-password-toggle-wrap {
  position: relative;
  width: 100%;
}
.login-password-toggle-wrap input[type=text], .login-password-toggle-wrap input[type=password] {
  padding-right: 46px;
}

.password-visibility-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-dim);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
}
.password-visibility-toggle:hover {
  color: var(--color-text);
  background: var(--cv-pill-bg);
}
.password-visibility-toggle:focus-visible {
  outline: none;
  box-shadow: var(--cv-focus-ring);
}
.password-visibility-toggle svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

/* ---- Generator ---- */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--color-text-dim);
  cursor: pointer;
  user-select: none;
}

.btn-generate {
  font-size: 1rem;
  padding: 12px 36px;
  border-radius: var(--radius);
}

details {
  border-radius: var(--radius-sm);
  padding: 4px;
}
details summary {
  color: var(--color-text-dim);
  font-size: 0.9rem;
  cursor: pointer;
}
details summary:hover {
  color: var(--color-text);
}

details[open] summary {
  color: var(--color-primary);
  margin-bottom: 8px;
}

/* ---- History ---- */
.history-card .history-text {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--color-text);
  line-height: 1.4;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.pager .pager-info {
  min-width: 80px;
  text-align: center;
}
.pager .btn.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---- Profile edit ---- */
.profile-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.profile-edit .samples-section {
  padding-top: 12px;
  margin-top: 12px;
}
.profile-edit .sample-row {
  background: var(--color-surface);
  border: none;
  padding: 10px 14px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
  box-shadow: inset 2px 2px 5px var(--shadow-dark-s), inset -2px -2px 5px var(--shadow-light-s);
}
.profile-edit .sample-row .sample-row-header {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 12px;
}
.profile-edit .sample-row .sample-player {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}
.profile-edit .sample-row .sample-waveform {
  position: relative;
  min-height: 88px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  box-shadow: inset 2px 2px 5px var(--shadow-dark-s), inset -2px -2px 5px var(--shadow-light-s);
}
.profile-edit .sample-row .sample-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-edit .sample-row .sample-controls--compact {
  gap: 10px;
}
.profile-edit .sample-row .sample-download-row {
  display: flex;
  justify-content: flex-start;
}
.profile-edit .sample-row .sample-selection-label {
  flex: 1 1 240px;
  min-width: 180px;
}
.profile-edit .sample-row .sample-gain-label {
  white-space: nowrap;
}
.profile-edit .sample-row .js_profile_sample_gain {
  flex: 1 1 180px;
  min-width: 140px;
}
.profile-edit .sample-row .sample-gain-value {
  min-width: 58px;
  text-align: right;
}
.profile-edit .sample-row .sample-audio-unavailable {
  margin: 0 0 10px;
}
.profile-edit .sample-row .js_profile_sample_sync_audio {
  margin-bottom: 10px;
}
.profile-edit .sample-row .sample-transcript-group {
  margin-bottom: 0;
}

.seed-edit .edit-seed-value {
  width: 100%;
}

/* ---- Footer (data folder) ---- */
.app-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 6px 20px;
  background: var(--color-bg);
  box-shadow: 0 -2px 6px var(--shadow-dark-s), 0 2px 4px var(--shadow-light-s);
  font-size: 0.72rem;
  color: var(--color-text-dim);
  -webkit-app-region: no-drag;
}
.app-footer.app-footer_mode-lecture-scene {
  display: none;
}

.data-folder-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 70vw;
  cursor: default;
}

.btn-link {
  background: none;
  border: none;
  color: var(--color-primary);
  cursor: pointer;
  font-size: 0.72rem;
  font-family: inherit;
  padding: 0;
  text-decoration: underline;
}
.btn-link:hover {
  color: var(--color-primary-alt);
}

.btn-neomorphic {
  padding: 4px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  color: var(--color-primary);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: box-shadow 0.2s, color 0.2s;
  box-shadow: 2px 2px 4px var(--shadow-dark-s), -2px -2px 4px var(--shadow-light-s);
}
.btn-neomorphic:hover {
  color: var(--color-primary-alt);
  box-shadow: 3px 3px 6px var(--shadow-dark-s), -3px -3px 6px var(--shadow-light-s);
}
.btn-neomorphic:active {
  box-shadow: inset 2px 2px 4px var(--shadow-dark-s), inset -2px -2px 4px var(--shadow-light-s);
}

.footer-sep {
  color: var(--color-text-dim);
  opacity: 0.4;
  margin-left: auto;
}

/* ---- Log panel ---- */
.log-panel {
  position: fixed;
  bottom: 32px; /* height of footer (unzoomed) */
  left: 0;
  right: 0;
  z-index: 999;
  height: 220px;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  box-shadow: 0 -3px 10px var(--shadow-dark-s), 0 1px 4px var(--shadow-light-s);
  border-top: 1px solid var(--shadow-dark-s);
}

.log-panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 12px;
  border-bottom: 1px solid var(--shadow-dark-s);
  flex-shrink: 0;
  gap: 12px;
}

.log-panel-buttons {
  display: flex;
  gap: 12px;
  align-items: center;
}
.log-panel-buttons .btn-link {
  background: var(--color-bg);
  color: var(--color-primary);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: box-shadow 0.2s, color 0.2s;
  box-shadow: 2px 2px 4px var(--shadow-dark-s), -2px -2px 4px var(--shadow-light-s);
}
.log-panel-buttons .btn-link:hover {
  color: var(--color-primary-alt);
  box-shadow: 3px 3px 6px var(--shadow-dark-s), -3px -3px 6px var(--shadow-light-s);
}
.log-panel-buttons .btn-link:active {
  box-shadow: inset 2px 2px 4px var(--shadow-dark-s), inset -2px -2px 4px var(--shadow-light-s);
}

.log-panel-title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.log-lines {
  flex: 1;
  overflow-y: auto;
  padding: 6px 12px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.5;
}

.log-line {
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--color-text);
  padding: 1px 0;
}
.log-line .log-time {
  color: var(--color-text-dim);
  margin-right: 6px;
}
.log-line.log-warn .log-text {
  color: var(--color-warning);
}
.log-line.log-error .log-text {
  color: var(--color-accent);
}

/* ---- Generating overlay ---- */
.generating-overlay {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  pointer-events: none;
}

.generating-overlay-card {
  background: var(--color-surface);
  color: var(--color-text);
  padding: 14px 20px;
  border-radius: 14px;
  box-shadow: 4px 4px 14px var(--shadow-dark), -4px -4px 14px var(--shadow-light);
  text-align: center;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.generating-label {
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
}

.generating-spinner circle {
  stroke: var(--color-primary);
  stroke-dasharray: 90 150;
  transform-origin: center;
  animation: gen-spin 1.1s linear infinite;
}

@keyframes gen-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* ====================================================================
   Cupertino theme — visual overrides (Apple HIG-inspired)
   ==================================================================== */
body {
  font-family: var(--font-main);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.log-panel-open {
  padding: 0;
}

/* ---- Header (flat, divider line) ---- */
.app-header {
  box-shadow: none;
  border-bottom: none;
  padding-top: 12px;
  padding-bottom: 12px;
  flex-wrap: wrap;
  gap: 0 12px;
  position: sticky;
  top: 0;
  z-index: 1100;
  flex: 0 0 auto;
  justify-content: flex-start;
}
.app-header h1 {
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.03rem;
}
.app-header .backend-status, .app-header .hub-status {
  background: var(--cv-status-bg);
  color: var(--cv-status-text);
  box-shadow: none;
  border-radius: 6px;
  padding: 5px 14px;
  font-size: 0.9rem;
  font-weight: 500;
}
.app-header .backend-status.offline, .app-header .hub-status.offline {
  background: var(--cv-danger-bg);
  color: var(--color-accent);
}
.app-header .startup-status {
  font-size: 11px;
}
.app-header .btn-cogs {
  background: transparent;
  box-shadow: none;
  border: none;
  color: var(--color-text-dim);
  padding: 4px 6px;
  border-radius: 6px;
  font-size: 1rem;
}
.app-header .btn-cogs:hover {
  background: var(--cv-pill-bg);
  color: var(--color-text);
}
.app-header .app-nav {
  flex: 1 1 auto;
  padding: 0;
  background: transparent;
  border: none;
}
.app-header .header-status {
  margin-left: 0;
}
.app-header::after {
  content: "";
  display: block;
  position: absolute;
  bottom: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: lightgray;
}

.app-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.app-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  width: 100%;
  max-width: 1024px;
  margin-inline: auto;
}

body[data-tab=projet] .app-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  max-width: none;
  margin-inline: 0;
}

body[data-tab=projet] .app-main > * {
  flex: 1 1 auto;
  min-height: 0;
}

@media (max-width: 1480px) {
  .app-header {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-areas: "brand brand status" ". toolbar .";
  }
  .header-scene-toolbar {
    width: auto;
  }
  .header-scene-toolbar_group {
    width: max-content;
    margin-inline: auto;
  }
  .app-body.app-body_has-scene-toolbar {
    padding-top: 64px;
  }
}
@media (max-width: 980px) {
  .app-header {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "brand" "toolbar" "status";
  }
  .app-header .app-header_brand {
    gap: 10px 16px;
  }
  .app-header .header-status {
    justify-content: space-between;
  }
}
@media (max-width: 760px) {
  .app-header .app-header_brand {
    flex-direction: column;
    align-items: flex-start;
  }
  .app-nav {
    width: 100%;
  }
}
@media (max-width: 640px) {
  .header-scene-toolbar_group {
    width: fit-content;
    max-width: 100%;
  }
  .header-scene-toolbar_button {
    min-width: 2.75rem;
    padding-inline: 0.8rem;
  }
  .header-scene-toolbar_button span {
    display: none;
  }
  .header-scene-toolbar_action-label {
    display: none;
  }
  .header-scene-toolbar_icon-button {
    min-width: 2.75rem;
    width: 2.75rem;
    padding-inline: 0;
  }
}
.header-user-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
}

.header-user-button {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text-dim);
  font: inherit;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.header-user-button:hover {
  background: var(--cv-pill-bg);
  color: var(--color-text);
}

.header-user-avatar {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--cv-pill-bg);
}

.header-user-avatar_img,
.account-floating_avatar_img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.header-user-avatar_placeholder,
.account-floating_avatar_placeholder {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-primary);
}

.header-user-button_label {
  font-size: 0.95rem;
  line-height: 1.2;
  min-width: 0;
  max-width: clamp(8rem, 16vw, 16rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-user-button_icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.header-user-dropdown {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  min-width: 156px;
  padding: 0.3rem;
  margin: 0;
  z-index: 1250;
  background: var(--color-surface);
  border: 1px solid var(--cv-divider-color);
  border-radius: 10px;
  box-shadow: var(--cv-card-shadow);
}

.header-user-dropdown_item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text-dim);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 500;
  text-align: left;
  padding: 0.48rem 0.65rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  gap: 0.55rem;
}
.header-user-dropdown_item:hover {
  background: var(--cv-pill-bg);
  color: var(--color-text);
}
.header-user-dropdown_item i {
  width: 1.1rem;
  text-align: center;
}

.projets-secondary-title {
  margin-top: 2rem;
}

.projets-empty-note {
  width: 100%;
  margin: 0.4rem 0 0;
}

.settings-floating {
  position: fixed;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 320px;
  min-height: 210px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--cv-divider-color);
  border-radius: 12px;
  box-shadow: var(--cv-card-shadow);
}
.settings-floating.is_pad_front .settings-floating_header {
  background: var(--cv-pad-front-header-bg);
  border-bottom-color: var(--cv-pad-front-header-border);
}
.settings-floating.is_pad_front .settings-floating_traffic {
  background: var(--cv-pad-active-traffic-bg);
  border-color: var(--cv-pad-active-traffic-border);
}

.settings-floating_header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--cv-divider-color);
  background: var(--color-surface);
  cursor: grab;
  touch-action: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.settings-floating_header:active {
  cursor: grabbing;
}

.settings-floating_title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: center;
}

.settings-floating_header_spacer {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.settings-floating_close {
  padding: 0;
  border: none;
  background: transparent;
}

.settings-floating_traffic {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--cv-pad-inactive-traffic-bg);
  border: 1px solid var(--cv-pad-inactive-traffic-border);
  cursor: pointer;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.15s, background 0.15s ease, border-color 0.15s ease;
}
.settings-floating_traffic::after {
  content: "✕";
  font-size: 9px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity 0.15s;
}
.settings-floating_traffic:hover::after {
  opacity: 1;
}
.settings-floating_traffic:hover {
  filter: brightness(0.95);
}

.settings-floating_body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0.95rem;
}
.settings-floating_body .form-group {
  margin-inline: 0;
  margin-block: 0.2rem;
}

.settings-chrome-compatibility {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.9rem;
}

.settings-floating_body .settings-chrome-compatibility .settings-chrome-compatibility_switch {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  align-self: start;
  margin: 0;
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.88rem;
  cursor: pointer;
}

.settings-floating_body .settings-chrome-compatibility .settings-chrome-compatibility_switch .cogi_switch_track {
  flex: 0 0 auto;
}

.settings-chrome-compatibility_note {
  margin: 0;
  max-width: 34rem;
  color: var(--color-text-muted, color-mix(in srgb, var(--color-text, #222) 68%, transparent));
  font-size: 0.82rem;
  line-height: 1.35;
}

.settings-floating_resize {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 18px;
  height: 18px;
  cursor: nwse-resize;
  touch-action: none;
  background: linear-gradient(135deg, transparent 0, transparent 35%, rgba(0, 0, 0, 0.28) 36%, rgba(0, 0, 0, 0.28) 42%, transparent 43%, transparent 60%, rgba(0, 0, 0, 0.28) 61%, rgba(0, 0, 0, 0.28) 67%, transparent 68%);
}

.account-floating {
  min-width: 380px;
  min-height: 360px;
}

.utility-floating_body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.outils-floating {
  min-width: 420px;
  min-height: 360px;
}

.contacts-floating {
  min-width: 460px;
  min-height: 360px;
}

.logo-pad-floating {
  min-width: 360px;
  min-height: 220px;
}

.release-notes-floating {
  min-width: 420px;
  min-height: 260px;
}

.release-notes-layout {
  display: grid;
  grid-template-columns: minmax(13rem, 0.42fr) minmax(0, 1fr);
  gap: 1rem;
  min-height: 0;
  height: 100%;
}

.release-notes-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.release-notes-row {
  appearance: none;
  border: 1px solid rgba(17, 133, 200, 0.14);
  border-radius: 8px;
  background: rgba(17, 133, 200, 0.05);
  color: var(--color-text, #222);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  padding: 0.65rem 0.75rem;
  text-align: left;
}
.release-notes-row.est_selectionnee, .release-notes-row:hover, .release-notes-row:focus {
  border-color: rgba(17, 133, 200, 0.38);
  background: rgba(17, 133, 200, 0.13);
  outline: none;
}

.release-notes-row_title {
  font-weight: 700;
  line-height: 1.25;
}

.release-notes-row_date {
  color: var(--color-text-dim);
  font-size: 0.82rem;
}

.release-notes-detail {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 0 0.2rem 0.2rem 0;
}

.release-notes-detail_header {
  margin-bottom: 0.85rem;
}
.release-notes-detail_header h4,
.release-notes-detail_header p {
  margin: 0;
}
.release-notes-detail_header h4 {
  font-size: 1.05rem;
}
.release-notes-detail_header p {
  color: var(--color-text-dim);
  font-size: 0.86rem;
  margin-top: 0.2rem;
}

.release-notes-detail_content {
  padding: 1rem 1.1rem;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0.75rem;
  background: #ffffff;
  color: #1d1d1f;
  line-height: 1.55;
}
.release-notes-detail_content p,
.release-notes-detail_content ul,
.release-notes-detail_content ol,
.release-notes-detail_content blockquote {
  margin-top: 0;
}
.release-notes-detail_content a {
  color: #0a84ff;
}

.logo-pad-floating_body p {
  margin: 0;
  color: var(--color-text-dim);
}

.logo-pad-floating_body .release-notes-detail_content {
  font-family: var(--font-main, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif);
  font-size: 1rem;
  color: #1d1d1f;
}
.logo-pad-floating_body .release-notes-detail_content p,
.logo-pad-floating_body .release-notes-detail_content ul,
.logo-pad-floating_body .release-notes-detail_content ol,
.logo-pad-floating_body .release-notes-detail_content blockquote {
  margin: 0 0 1rem;
  color: #1d1d1f;
}
.logo-pad-floating_body .release-notes-detail_content p:last-child,
.logo-pad-floating_body .release-notes-detail_content ul:last-child,
.logo-pad-floating_body .release-notes-detail_content ol:last-child,
.logo-pad-floating_body .release-notes-detail_content blockquote:last-child {
  margin-bottom: 0;
}
.logo-pad-floating_body .release-notes-detail_content strong,
.logo-pad-floating_body .release-notes-detail_content b {
  font-weight: 700;
}

@media (max-width: 720px) {
  .release-notes-layout {
    grid-template-columns: 1fr;
  }
  .release-notes-list {
    max-height: 14rem;
  }
}

.outils-floating_body .outils_page,
.contacts-floating_body .contacts_page {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 1rem;
  min-height: 0;
  margin: 0;
}

.outils-floating_body .outils_section_card,
.contacts-floating_body .contacts_list_card,
.contacts-floating_body .contacts_detail_card {
  margin-bottom: 0;
}

.contacts-floating_body .contacts_page > .module-title {
  display: none;
}

.contacts-floating_body .contacts_layout {
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 0.85rem;
  flex: 1 1 auto;
  min-height: 0;
}

.account-floating_body {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.account-floating_identity {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.account-floating_avatar {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--cv-pill-bg);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

.account-floating_identity_text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.account-floating_name,
.account-floating_subtitle,
.account-floating_progress {
  margin: 0;
}

.account-floating_name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
}

.account-floating_subtitle {
  font-size: 0.84rem;
  color: var(--color-text-dim);
  overflow-wrap: anywhere;
}

.account-floating_readonly {
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: var(--cv-pill-bg);
  color: var(--color-text);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow-wrap: anywhere;
}

.account-floating_notice {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 0.85rem;
  line-height: 1.35;
}

.account-floating_notice_success {
  background: #e6f4ea;
  color: #1b5e20;
  border-color: #c8e6c9;
}

.account-floating_notice_error {
  background: #fdecea;
  color: #b71c1c;
  border-color: #f5c6cb;
}

.account-floating_notice_info {
  background: rgba(17, 133, 200, 0.08);
  color: #0d5f8c;
  border-color: rgba(17, 133, 200, 0.18);
}

.account-floating_upload_row {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-start;
}

.account-floating_hint {
  margin: 0;
}

.btn-cogs svg {
  display: block;
}

@media (min-width: 1024px) {
  .app-body {
    align-items: stretch;
  }
  .history-sidebar {
    align-self: stretch;
    min-height: 0;
    max-height: none;
    overflow: auto;
    position: static;
    top: auto;
  }
}
/* ---- Tabs (segmented control look) ---- */
.app-nav {
  padding: 0;
  gap: 4px;
  background: transparent;
  border-bottom: none;
  justify-content: flex-start;
}
.app-nav .nav-btn {
  flex: 0 0 auto;
  padding: 7px 16px;
  background: transparent;
  box-shadow: none;
  border: none;
  border-radius: 7px;
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--color-text-dim);
  transition: background 0.15s, color 0.15s;
}
.app-nav .nav-btn:hover {
  color: var(--color-text);
  background: var(--cv-pill-bg);
  box-shadow: none;
}
.app-nav .nav-btn.active {
  color: var(--color-text);
  background: var(--cv-tab-active-bg);
  box-shadow: var(--cv-tab-active-shadow);
}

/* ---- Inputs / select / textarea ---- */
input[type=text],
input[type=number],
input[type=password],
input[type=email],
input[type=search],
select,
textarea {
  background: var(--color-input-bg);
  border: var(--cv-input-border);
  border-radius: 8px;
  box-shadow: none;
  padding: 7px 11px;
  font-size: 13px;
  color: var(--color-text);
  font-family: var(--font-main);
  transition: box-shadow 0.15s, border-color 0.15s;
}
input[type=text]:focus,
input[type=number]:focus,
input[type=password]:focus,
input[type=email]:focus,
input[type=search]:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: var(--cv-focus-ring);
  border-color: var(--color-primary);
}

textarea {
  padding: 9px 11px;
  line-height: 1.45;
}

input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
  width: 100%;
  cursor: pointer;
}
input[type=range]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: var(--cv-bar-bg);
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--color-primary);
  margin-top: -6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.1s;
}
input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}
input[type=range]:focus {
  outline: none;
}
input[type=range]:focus::-webkit-slider-thumb {
  box-shadow: var(--cv-focus-ring);
}

/* ---- Buttons (pill) ---- */
.btn {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--cv-divider-color);
  box-shadow: none;
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 13px;
  font-weight: 500;
  transition: filter 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}
.btn:hover:not(:disabled) {
  filter: brightness(0.97);
  box-shadow: none;
}
.btn:active:not(:disabled) {
  filter: brightness(0.92);
  box-shadow: none;
  transform: none;
}
.btn.btn-primary, .btn.btn-generate {
  background: var(--color-primary);
  color: #fff;
  border: none;
  padding: 7px 20px;
}
.btn.btn-primary:hover:not(:disabled), .btn.btn-generate:hover:not(:disabled) {
  color: #fff;
  filter: brightness(1.05);
}
.btn.btn-secondary {
  background: var(--cv-pill-bg);
  color: var(--color-text);
  border: none;
}
.btn.btn-danger {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid var(--cv-divider-color);
}
.btn.btn-danger:hover:not(:disabled) {
  background: var(--cv-danger-bg);
  color: var(--color-accent);
}
.btn.btn-sm {
  font-size: 12px;
  padding: 4px 12px;
}

/* ---- Cards ---- */
.card {
  background: var(--color-surface);
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--cv-card-shadow);
  margin-bottom: 12px;
}

/* ---- Module title (h2) ---- */
.module-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--color-text);
  text-transform: none;
  letter-spacing: 0;
  margin-bottom: 1.2rem;
}

/* ---- Form labels ---- */
.form-group label {
  color: var(--color-text-dim);
  font-size: 12px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

/* ---- Checkbox ---- */
.checkbox-label {
  color: var(--color-text);
  font-size: 13px;
  font-weight: 400;
}
.checkbox-label input[type=checkbox] {
  accent-color: var(--color-primary);
  width: 15px;
  height: 15px;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* ---- Badges (pill) ---- */
.badge {
  background: var(--cv-pill-bg);
  color: var(--color-text);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  box-shadow: none;
  border: none;
}

.badge-seed,
.badge-seed-copy {
  background: var(--cv-tag-alt-bg);
  color: var(--cv-tag-alt-fg);
}

.badge-mode {
  background: var(--cv-pill-bg);
  color: var(--color-text-dim);
}

/* ---- Footer ---- */
.app-footer {
  background: var(--color-bg);
  border-top: 1px solid var(--cv-divider-color);
  box-shadow: none;
  color: var(--color-text-dim);
  font-size: 11px;
  position: relative;
  flex: 0 0 auto;
}

/* ---- Modals ---- */
.modal-backdrop {
  background: rgba(0, 0, 0, 0.4);
}

.modal-card {
  background: var(--color-surface);
  box-shadow: var(--cv-card-shadow);
  border-radius: 12px;
  border: none;
}

/* ---- Audio elements ---- */
audio {
  border-radius: 8px;
}

/* ---- Range value badges ---- */
.range-value {
  background: var(--cv-pill-bg);
  color: var(--color-text);
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 500;
  box-shadow: none;
}

/* ---- Details / advanced params ---- */
details.card > summary {
  color: var(--color-text);
  font-weight: 500;
}

.zone_logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0 !important;
  font-family: system-ui;
  font-weight: 200 !important;
  cursor: pointer;
}

.bulles_hub {
  margin-right: 0.4rem;
}

.bouton {
  cursor: pointer !important;
  transition: all 0.6s ease-out 0s;
  width: fit-content;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  transform: translateZ(0);
  border: none;
}
.bouton:active {
  transition: opacity 0.1s ease-out 0s;
  opacity: 0.5;
}

a {
  color: unset;
  text-decoration: none;
}

.sans_transition {
  transition: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) .app-nav .nav-btn {
    color: #dbdbdb;
  }
  :root:not([data-theme=light]) .app-nav .nav-btn:hover, :root:not([data-theme=light]) .app-nav .nav-btn.active {
    color: #ffffff;
  }
  :root:not([data-theme=light]) .header-scene-toolbar_button--import-export {
    color: #dbdbdb;
  }
  :root:not([data-theme=light]) .header-scene-toolbar_button--import-export:hover {
    color: #ffffff;
  }
  :root:not([data-theme=light]) .app-header .header-status .text-dim {
    color: #dbdbdb;
  }
  :root:not([data-theme=light]) .settings-floating_resize {
    background: linear-gradient(135deg, transparent 0, transparent 35%, rgba(255, 255, 255, 0.35) 36%, rgba(255, 255, 255, 0.35) 42%, transparent 43%, transparent 60%, rgba(255, 255, 255, 0.35) 61%, rgba(255, 255, 255, 0.35) 67%, transparent 68%);
  }
}
:root[data-theme=dark] .app-nav .nav-btn {
  color: #dbdbdb;
}
:root[data-theme=dark] .app-nav .nav-btn:hover, :root[data-theme=dark] .app-nav .nav-btn.active {
  color: #ffffff;
}
:root[data-theme=dark] .header-scene-toolbar_button--import-export {
  color: #dbdbdb;
}
:root[data-theme=dark] .header-scene-toolbar_button--import-export:hover {
  color: #ffffff;
}
:root[data-theme=dark] .app-header .header-status .text-dim {
  color: #dbdbdb;
}
:root[data-theme=dark] .settings-floating_resize {
  background: linear-gradient(135deg, transparent 0, transparent 35%, rgba(255, 255, 255, 0.35) 36%, rgba(255, 255, 255, 0.35) 42%, transparent 43%, transparent 60%, rgba(255, 255, 255, 0.35) 61%, rgba(255, 255, 255, 0.35) 67%, transparent 68%);
}

@media (max-width: 900px) {
  .header-user-dropdown {
    right: 0;
    left: auto;
  }
}
@media (pointer: coarse) {
  .settings-floating_resize {
    width: 28px;
    height: 28px;
  }
}
.outils_section_card,
.contacts_list_card,
.contacts_detail_card {
  margin-bottom: 2rem;
}

.outils_section_heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.outils_section_title,
.contacts_detail_title,
.contacts_detail_section_title {
  margin: 0;
  color: var(--color-text);
}

.outils_section_title {
  margin-bottom: 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.outils_voice_stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.outils_basic_list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  color: var(--color-text);
}
.outils_basic_list li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: var(--cv-pill-bg);
  color: var(--color-text);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}
.outils_basic_list li::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-primary), #5aa2de);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.12);
}

.contacts_layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.contacts_list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contacts_list_item {
  width: 100%;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--color-text);
  text-align: left;
  padding: 0.7rem 0.85rem;
  font: inherit;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.contacts_list_item:hover, .contacts_list_item.is_selected {
  background: var(--cv-pill-bg);
}
.contacts_list_item.is_selected {
  color: var(--color-primary);
  font-weight: 600;
}

.contacts_detail {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contacts_detail_meta,
.contacts_detail_placeholder {
  margin: 0;
  color: var(--color-text-dim);
}

.contacts_detail_section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contacts_projects_list {
  margin: 0;
  padding-left: 1rem;
  color: var(--color-text);
}

@media (max-width: 900px) {
  .header-projects-dropdown {
    left: 0;
    right: auto;
    min-width: min(320px, 100vw - 32px);
  }
  .contacts_layout {
    grid-template-columns: 1fr;
  }
}