* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;

  --background-gradient: linear-gradient(
    135deg,
    #dff4ea 0%,
    #d8f0e4 50%,
    #dff4ea 100%
  );

  --background-overlay-image: none;
  --background-overlay-opacity: 0.05;

  --text-color: #b04c73;
  --muted-text-color: rgba(176, 76, 115, 0.6);

  --card-bg: #ffffff;
  --card-border: rgba(230, 185, 205, 0.65);
  --card-shadow: 0 10px 24px rgba(150, 120, 135, 0.18);

  --input-bg: #ffffff;
  --input-border: rgba(215, 225, 220, 0.9);
  --input-focus-border: #eaa4c3;
  --input-focus-shadow: 0 0 0 3px rgba(234, 164, 195, 0.25);
  --input-text-color: #b04c73;

  --button-bg: linear-gradient(120deg, #f6c0d6, #fbd8e7);
  --button-text: #8b3659;
  --button-shadow-hover: 0 6px 16px rgba(139, 54, 89, 0.22);
  --button-shadow-active: 0 3px 10px rgba(139, 54, 89, 0.18);

  --button-secondary-bg: linear-gradient(120deg, #eef8f3, #e6f5ee);

  --auto-button-bg: linear-gradient(135deg, #f8c0d8, #f7a3c4, #d6b8ff);
  --auto-button-text: #7a2f4e;
  --auto-button-border: rgba(176, 76, 115, 0.35);
  --auto-button-shadow: 0 10px 28px rgba(176, 76, 115, 0.28),
    0 6px 16px rgba(0, 0, 0, 0.18);
  --auto-button-hover-shadow: 0 14px 34px rgba(176, 76, 115, 0.36),
    0 10px 18px rgba(0, 0, 0, 0.18);
  --auto-button-active-shadow: 0 8px 18px rgba(176, 76, 115, 0.25),
    0 5px 12px rgba(0, 0, 0, 0.14);

  --link-color: #c46a97;

  --family-card-bg: linear-gradient(
    135deg,
    rgba(255, 230, 242, 0.94),
    rgba(221, 245, 233, 0.94)
  );
  --family-card-border: rgba(230, 185, 205, 0.7);
  --family-primary-color: #b04c73;
  --family-secondary-color: rgba(238, 115, 170, 0.9);

  --draggable-border: rgba(210, 225, 218, 0.9);
  --draggable-bg: rgba(255, 255, 255, 0.9);

  --constraint-bg: rgba(255, 255, 255, 0.94);
  --constraint-border: rgba(230, 185, 205, 0.7);
  --constraint-text: rgba(176, 76, 115, 0.6);

  --table-card-bg: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.96),
    rgba(221, 245, 233, 0.94)
  );
  --table-card-border: rgba(210, 225, 218, 0.9);
  --table-title-color: #a34a6b;
  --table-capacity-color: rgba(90, 132, 113, 0.8);

  --empty-text: rgba(90, 132, 113, 0.65);

  --chip-bg: rgba(190, 235, 210, 0.75);
  --chip-text: #577b67;

  --head-chip-bg: rgba(255, 197, 223, 0.9);
  --head-chip-text: #8b3659;

  --footer-bg: rgba(255, 255, 255, 0.94);
  --summary-border: rgba(230, 185, 205, 0.7);
  --summary-text: rgba(90, 132, 113, 0.78);

  --top-bar-bg: rgba(255, 255, 255, 0.92);
  --top-bar-border: rgba(230, 185, 205, 0.7);

  --language-select-bg: #ffffff;
  --language-select-color: #b04c73;
  --language-select-option-color: #b04c73;
}


body[data-theme="dark"] {
  color-scheme: dark;
  --background-gradient: radial-gradient(circle at top left, #221a33 0%, #161321 45%, #100e18 100%);
  --background-overlay-opacity: 0.16;
  --text-color: #f4e9f7;
  --muted-text-color: rgba(244, 233, 247, 0.7);
  --card-bg: rgba(32, 27, 45, 0.88);
  --card-border: rgba(124, 102, 168, 0.4);
  --card-shadow: 0 12px 34px rgba(3, 2, 10, 0.6);
  --input-bg: rgba(46, 41, 60, 0.9);
  --input-border: rgba(136, 118, 176, 0.55);
  --input-focus-border: #c69eff;
  --input-focus-shadow: 0 0 0 3px rgba(198, 158, 255, 0.22);
  --input-text-color: #f4e9f7;
  --button-bg: linear-gradient(120deg, #7f5af0, #bb86fc);
  --button-text: #f7f3ff;
  --button-shadow-hover: 0 6px 18px rgba(127, 90, 240, 0.35);
  --button-shadow-active: 0 3px 12px rgba(127, 90, 240, 0.25);
  --button-secondary-bg: linear-gradient(120deg, #3d2d5f, #47346f);

  --auto-button-bg: linear-gradient(135deg, #b084f7, #f472b6, #7c3aed);
  --auto-button-text: #0e0818;
  --auto-button-border: rgba(200, 168, 255, 0.45);
  --auto-button-shadow: 0 12px 30px rgba(172, 116, 245, 0.35),
    0 6px 16px rgba(0, 0, 0, 0.28);
  --auto-button-hover-shadow: 0 16px 36px rgba(172, 116, 245, 0.42),
    0 10px 18px rgba(0, 0, 0, 0.28);
  --auto-button-active-shadow: 0 10px 22px rgba(172, 116, 245, 0.3),
    0 5px 12px rgba(0, 0, 0, 0.2);
  --link-color: #c8a8ff;
  --family-card-bg: linear-gradient(135deg, rgba(60, 46, 89, 0.95), rgba(48, 38, 72, 0.95));
  --family-card-border: rgba(136, 118, 176, 0.45);
  --family-primary-color: #f4e9f7;
  --family-secondary-color: rgba(244, 233, 247, 0.75);
  --draggable-border: rgba(136, 118, 176, 0.55);
  --draggable-bg: rgba(34, 28, 52, 0.78);
  --constraint-bg: rgba(34, 28, 52, 0.9);
  --constraint-border: rgba(136, 118, 176, 0.3);
  --constraint-text: rgba(215, 198, 255, 0.7);
  --table-card-bg: linear-gradient(160deg, rgba(46, 41, 66, 0.92), rgba(34, 30, 50, 0.9));
  --table-card-border: rgba(124, 102, 168, 0.35);
  --table-title-color: #d3c2ff;
  --table-capacity-color: rgba(215, 198, 255, 0.78);
  --empty-text: rgba(215, 198, 255, 0.6);
  --chip-bg: rgba(127, 90, 240, 0.2);
  --chip-text: #d3c2ff;
  --head-chip-bg: rgba(241, 176, 216, 0.3);
  --head-chip-text: #ffd7ef;
  --footer-bg: rgba(21, 18, 32, 0.92);
  --summary-border: rgba(124, 102, 168, 0.35);
  --summary-text: rgba(215, 198, 255, 0.7);
  --top-bar-bg: rgba(21, 18, 32, 0.92);
  --top-bar-border: rgba(124, 102, 168, 0.4);
  --language-select-bg: rgba(255, 255, 255, 0.96);
  --language-select-color: #3d233f;
  --language-select-option-color: #3d233f;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Quicksand", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--background-gradient);
  color: var(--text-color);
  transition: background 0.3s ease, color 0.3s ease;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--background-overlay-image);
  background-size: cover;
  background-position: center;
  opacity: var(--background-overlay-opacity);
  pointer-events: none;
  mix-blend-mode: screen;
  transition: opacity 0.3s ease;
}

body[data-theme="dark"]::before {
  mix-blend-mode: lighten;
}

#root {
  min-height: 100vh;
}

.formation-button:hover,
.formation-button--active:hover {
  color: #000 !important;
}
.formation-button {
  background: #e7b1f1 !important;
}