:root {
  --bg: #070a08;
  --surface: #0d1410;
  --surface-2: #111b15;
  --surface-3: #17211b;
  --line: rgba(201, 218, 205, 0.12);
  --line-strong: rgba(57, 255, 20, 0.42);
  --text: #f2f8f3;
  --muted: #98aa9e;
  --soft: #66776d;
  --green: #39ff14;
  --green-soft: rgba(57, 255, 20, 0.12);
  --blue: #78a8ff;
  --amber: #d7a85c;
  --danger: #ff6262;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  scrollbar-color: rgba(57, 255, 20, 0.72) #121816;
  scrollbar-width: thin;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.client-modal-card::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.client-modal-card::-webkit-scrollbar-track {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    #111816;
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.client-modal-card::-webkit-scrollbar-thumb {
  border: 3px solid #111816;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(57, 255, 20, 0.92), rgba(57, 255, 20, 0.42));
  box-shadow: inset 0 0 0 1px rgba(211, 255, 206, 0.12);
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.client-modal-card::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg, rgba(165, 255, 153, 0.96), rgba(57, 255, 20, 0.58));
}

html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
.client-modal-card::-webkit-scrollbar-corner {
  background: #111816;
}

body {
  margin: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(145deg, #050806 0%, #0a1212 50%, #070911 100%);
  background-size: 44px 44px, 44px 44px, auto;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
}

.automation-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 46px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.breadcrumb a {
  color: var(--green);
  text-decoration: none;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: end;
  gap: 18px;
  padding: 18px 0 22px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.page-hero h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: 0;
}

.page-hero p:last-child {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.hero-stat {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(150deg, rgba(57, 255, 20, 0.13), rgba(120, 168, 255, 0.06)),
    var(--surface);
  display: grid;
  align-content: center;
  justify-items: center;
}

.hero-stat span {
  color: var(--green);
  font-size: 36px;
  line-height: 1;
  font-weight: 900;
}

.hero-stat small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.control-panel {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(13, 20, 16, 0.86);
  display: grid;
  gap: 12px;
}

.squad-filter {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.squad-chip {
  min-width: 102px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.squad-chip:hover,
.squad-chip.is-active {
  border-color: var(--green);
  background: var(--green-soft);
  color: var(--green);
  transform: translateY(-1px);
}

.filter-search-row {
  width: min(860px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.search-bar {
  min-height: 48px;
  width: 100%;
  margin: 0;
  border: 1px solid rgba(57, 255, 20, 0.32);
  border-radius: 8px;
  background: #07100b;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  box-shadow: 0 0 0 1px rgba(57, 255, 20, 0.04), 0 14px 34px rgba(0, 0, 0, 0.2);
}

.search-bar svg {
  width: 18px;
  height: 18px;
  justify-self: center;
  color: var(--green);
}

.search-bar input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.search-bar input::placeholder {
  color: #52645a;
}

.client-board {
  border: 1px solid rgba(201, 218, 205, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    linear-gradient(90deg, rgba(57, 255, 20, 0.05), transparent 32%, rgba(120, 168, 255, 0.045)),
    rgba(13, 20, 16, 0.92);
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

.board-head {
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(201, 218, 205, 0.13);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.board-head span {
  display: block;
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.board-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

.board-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.add-client-btn {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(57, 255, 20, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(57, 255, 20, 0.2), rgba(57, 255, 20, 0.08));
  color: var(--green);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.add-client-btn:hover {
  border-color: rgba(57, 255, 20, 0.72);
  background:
    linear-gradient(180deg, rgba(57, 255, 20, 0.28), rgba(57, 255, 20, 0.12));
  color: #d9ffd3;
  transform: translateY(-1px);
}

.edit-client-btn {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(120, 168, 255, 0.38);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(120, 168, 255, 0.16), rgba(120, 168, 255, 0.055));
  color: #aecaff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.edit-client-btn:hover {
  border-color: rgba(120, 168, 255, 0.68);
  background:
    linear-gradient(180deg, rgba(120, 168, 255, 0.24), rgba(120, 168, 255, 0.09));
  color: #dce8ff;
  transform: translateY(-1px);
}

.remove-client-btn {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(255, 98, 98, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 98, 98, 0.12), rgba(255, 98, 98, 0.045));
  color: #ff9a9a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.remove-client-btn:hover {
  border-color: rgba(255, 98, 98, 0.62);
  background:
    linear-gradient(180deg, rgba(255, 98, 98, 0.18), rgba(255, 98, 98, 0.07));
  color: #ffd1d1;
  transform: translateY(-1px);
}

.clear-btn {
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid rgba(120, 168, 255, 0.34);
  border-radius: 8px;
  background: rgba(120, 168, 255, 0.08);
  color: var(--blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.client-table {
  width: 100%;
  background: rgba(5, 10, 7, 0.24);
}

.client-row {
  position: relative;
  display: grid;
  grid-template-columns: 148px minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 18px;
  min-height: 64px;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid rgba(201, 218, 205, 0.075);
}

.client-row-head {
  min-height: 46px;
  border-bottom-color: rgba(201, 218, 205, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    rgba(9, 16, 12, 0.95);
  color: #7e9686;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-list {
  max-height: min(58vh, 650px);
  overflow: auto;
  scrollbar-color: rgba(57, 255, 20, 0.72) #111816;
  scrollbar-width: thin;
}

.client-list::-webkit-scrollbar {
  width: 12px;
}

.client-list::-webkit-scrollbar-track {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    #111816;
}

.client-list::-webkit-scrollbar-thumb {
  border: 3px solid #111816;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(57, 255, 20, 0.92), rgba(57, 255, 20, 0.42));
  box-shadow: inset 0 0 0 1px rgba(211, 255, 206, 0.12);
}

.client-list::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg, rgba(165, 255, 153, 0.96), rgba(57, 255, 20, 0.58));
}

.client-list .client-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.018);
}

.client-list .client-row:hover {
  background:
    linear-gradient(90deg, rgba(57, 255, 20, 0.1), rgba(57, 255, 20, 0.025) 38%, rgba(120, 168, 255, 0.035));
}

.client-list .client-row::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: transparent;
}

.client-list .client-row:hover::before {
  background: var(--green);
  box-shadow: 0 0 16px rgba(57, 255, 20, 0.5);
}

.squad-name,
.company-name,
.send-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.squad-name {
  width: fit-content;
  min-width: 96px;
  padding: 8px 11px;
  border: 1px solid rgba(57, 255, 20, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(57, 255, 20, 0.14), rgba(57, 255, 20, 0.06));
  color: var(--green);
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025);
}

.squad-invictus {
  border-color: rgba(120, 168, 255, 0.42);
  background:
    linear-gradient(180deg, rgba(120, 168, 255, 0.16), rgba(120, 168, 255, 0.06));
  color: var(--blue);
}

.squad-legacy {
  border-color: rgba(215, 168, 92, 0.45);
  background:
    linear-gradient(180deg, rgba(215, 168, 92, 0.17), rgba(215, 168, 92, 0.06));
  color: var(--amber);
}

.squad-exclusivo {
  border-color: rgba(255, 98, 98, 0.45);
  background:
    linear-gradient(180deg, rgba(255, 98, 98, 0.16), rgba(255, 98, 98, 0.06));
  color: var(--danger);
}

.company-name {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
}

.send-name {
  color: #b4c8b9;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.empty-state {
  min-height: 180px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-state strong {
  color: var(--text);
  font-size: 18px;
}

body.client-modal-open {
  overflow: hidden;
}

.client-modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 26px;
  overflow: auto;
}

.client-modal[hidden] {
  display: none;
}

.client-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 26%, rgba(57, 255, 20, 0.11), transparent 34%),
    linear-gradient(180deg, rgba(4, 8, 6, 0.72), rgba(0, 0, 0, 0.84));
  backdrop-filter: blur(14px);
}

.client-modal-card {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  border: 1px solid rgba(57, 255, 20, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(57, 255, 20, 0.11), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    #08110b;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.035) inset;
  overflow: visible;
}

.client-modal-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, transparent, rgba(57, 255, 20, 0.82), transparent);
  pointer-events: none;
}

.client-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid rgba(201, 218, 205, 0.12);
  background: rgba(0, 0, 0, 0.1);
}

.client-modal-head span {
  display: block;
  margin-bottom: 7px;
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.client-modal-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.12;
  font-weight: 900;
}

.modal-close-btn,
.modal-secondary-btn,
.modal-primary-btn,
.modal-danger-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.modal-close-btn,
.modal-secondary-btn {
  border: 1px solid rgba(201, 218, 205, 0.16);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.modal-close-btn:hover,
.modal-secondary-btn:hover {
  border-color: rgba(201, 218, 205, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.modal-primary-btn {
  border: 1px solid rgba(57, 255, 20, 0.55);
  background: var(--green);
  color: #061006;
}

.modal-primary-btn:hover {
  border-color: rgba(57, 255, 20, 0.86);
  background: #67ff4b;
}

.modal-danger-btn {
  border: 1px solid rgba(255, 98, 98, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 98, 98, 0.18), rgba(255, 98, 98, 0.08)),
    #220b0b;
  color: #ffd1d1;
}

.modal-danger-btn:hover:not(:disabled) {
  border-color: rgba(255, 98, 98, 0.86);
  background:
    linear-gradient(180deg, rgba(255, 98, 98, 0.28), rgba(255, 98, 98, 0.12)),
    #2a0d0d;
}

.modal-danger-btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.client-form {
  display: grid;
  gap: 15px;
  padding: 22px 24px 24px;
}

.client-form label {
  display: grid;
  gap: 8px;
}

.client-form label span {
  color: #9fb3a5;
  font-size: 12px;
  font-weight: 900;
}

.client-form input,
.client-form select {
  min-height: 50px;
  width: 100%;
  border: 1px solid rgba(57, 255, 20, 0.3);
  border-radius: 8px;
  outline: 0;
  background:
    linear-gradient(180deg, rgba(57, 255, 20, 0.055), rgba(57, 255, 20, 0.01)),
    #050e08;
  color: var(--text);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.018);
}

.client-form select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--green) 50%),
    linear-gradient(135deg, var(--green) 50%, transparent 50%),
    linear-gradient(180deg, rgba(57, 255, 20, 0.08), rgba(57, 255, 20, 0.015)),
    #061009;
  background-position:
    calc(100% - 19px) 50%,
    calc(100% - 13px) 50%,
    0 0,
    0 0;
  background-repeat: no-repeat;
  background-size:
    6px 6px,
    6px 6px,
    100% 100%,
    100% 100%;
  cursor: pointer;
  padding-right: 42px;
}

.client-form select:hover {
  border-color: rgba(57, 255, 20, 0.64);
  box-shadow: 0 0 0 1px rgba(57, 255, 20, 0.08);
}

.client-form select option {
  background: #061009;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.client-form select option:checked {
  background: linear-gradient(90deg, rgba(57, 255, 20, 0.26), rgba(57, 255, 20, 0.1));
  color: var(--green);
}

.client-form select option:disabled {
  color: #52645a;
}

.custom-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-button {
  width: 100%;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(57, 255, 20, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(57, 255, 20, 0.075), rgba(57, 255, 20, 0.012)),
    #050e08;
  color: var(--text);
  cursor: pointer;
  padding: 0 14px;
  text-align: left;
  font-size: 14px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.custom-select-button span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select-button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: var(--green);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.16s ease;
}

.custom-select-button:hover,
.custom-select.is-open .custom-select-button {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(57, 255, 20, 0.1), inset 0 0 0 1px rgba(57, 255, 20, 0.08);
}

.custom-select.is-open .custom-select-button svg {
  transform: rotate(180deg);
}

.custom-select-menu {
  position: absolute;
  z-index: 1500;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  display: none;
  max-height: 286px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(57, 255, 20, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(57, 255, 20, 0.06), transparent 44%),
    #040c07;
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.56),
    inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  scrollbar-color: rgba(57, 255, 20, 0.72) #111816;
  scrollbar-width: thin;
}

.custom-select.is-open .custom-select-menu {
  display: grid;
  gap: 6px;
}

.custom-select-menu::-webkit-scrollbar {
  width: 10px;
}

.custom-select-menu::-webkit-scrollbar-track {
  background: #111816;
}

.custom-select-menu::-webkit-scrollbar-thumb {
  border: 2px solid #111816;
  border-radius: 999px;
  background: rgba(57, 255, 20, 0.72);
}

.custom-select-option {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 0 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 900;
}

.custom-select-option:hover {
  border-color: rgba(57, 255, 20, 0.24);
  background: rgba(57, 255, 20, 0.08);
  color: #dfffd9;
}

.custom-select-option.is-selected,
.custom-select-option[aria-selected="true"] {
  border-color: rgba(57, 255, 20, 0.48);
  background:
    linear-gradient(90deg, rgba(57, 255, 20, 0.18), rgba(57, 255, 20, 0.08));
  color: var(--green);
}

.custom-select-option[data-value=""].is-selected,
.custom-select-option[data-value=""][aria-selected="true"] {
  border-color: rgba(201, 218, 205, 0.14);
  background: rgba(255, 255, 255, 0.035);
  color: var(--muted);
}

.client-form input::placeholder {
  color: #516258;
}

.client-form input:focus,
.client-form select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(57, 255, 20, 0.1);
}

.client-form-status {
  min-height: 18px;
  margin: 0;
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
}

.client-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
}

.edit-modal-card {
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 52px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.edit-client-panel {
  display: grid;
  min-height: 0;
  padding: 22px 24px 24px;
}

.edit-list-view {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 14px;
}

.edit-list-view[hidden],
.edit-client-form[hidden] {
  display: none;
}

.edit-search {
  display: grid;
  gap: 8px;
}

.edit-search span {
  color: #9fb3a5;
  font-size: 12px;
  font-weight: 900;
}

.edit-search input {
  min-height: 50px;
  width: 100%;
  border: 1px solid rgba(120, 168, 255, 0.34);
  border-radius: 8px;
  outline: 0;
  background:
    linear-gradient(180deg, rgba(120, 168, 255, 0.08), rgba(120, 168, 255, 0.014)),
    #050e08;
  color: var(--text);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 800;
}

.edit-search input::placeholder {
  color: #516258;
}

.edit-search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(120, 168, 255, 0.12);
}

.edit-client-list {
  min-height: 0;
  max-height: none;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding-right: 4px;
  scrollbar-color: rgba(120, 168, 255, 0.72) #111816;
  scrollbar-width: thin;
}

.edit-client-list::-webkit-scrollbar {
  width: 10px;
}

.edit-client-list::-webkit-scrollbar-track {
  background: #111816;
}

.edit-client-list::-webkit-scrollbar-thumb {
  border: 2px solid #111816;
  border-radius: 999px;
  background: rgba(120, 168, 255, 0.72);
}

.edit-client-row {
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(201, 218, 205, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.edit-client-row:hover {
  border-color: rgba(120, 168, 255, 0.26);
  background: rgba(120, 168, 255, 0.05);
}

.edit-client-details {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.edit-client-details strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.edit-client-details span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.edit-client-action {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(120, 168, 255, 0.38);
  border-radius: 8px;
  background: rgba(120, 168, 255, 0.1);
  color: #aecaff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.edit-client-action:hover {
  border-color: rgba(120, 168, 255, 0.72);
  background: rgba(120, 168, 255, 0.17);
  color: #e3ecff;
}

.edit-client-empty {
  min-height: 130px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  border: 1px dashed rgba(201, 218, 205, 0.16);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.edit-client-empty[hidden] {
  display: none;
}

.edit-client-empty strong {
  color: var(--text);
}

.edit-client-form {
  min-height: 0;
  overflow: auto;
  padding: 0;
}

.edit-selected-card {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(120, 168, 255, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(120, 168, 255, 0.1), transparent 48%),
    rgba(255, 255, 255, 0.03);
  padding: 13px 14px;
}

.edit-selected-card span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.edit-selected-card strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.edit-selected-card small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.edit-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 2px;
}

.remove-modal-card {
  width: min(680px, 100%);
  max-height: min(760px, calc(100vh - 52px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.remove-client-panel {
  display: grid;
  min-height: 0;
  padding: 22px 24px 24px;
}

.remove-list-view {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 14px;
}

.remove-list-view[hidden] {
  display: none;
}

.remove-search {
  display: grid;
  gap: 8px;
}

.remove-search span {
  color: #9fb3a5;
  font-size: 12px;
  font-weight: 900;
}

.remove-search input {
  min-height: 50px;
  width: 100%;
  border: 1px solid rgba(57, 255, 20, 0.3);
  border-radius: 8px;
  outline: 0;
  background:
    linear-gradient(180deg, rgba(57, 255, 20, 0.055), rgba(57, 255, 20, 0.01)),
    #050e08;
  color: var(--text);
  padding: 0 14px;
  font-size: 14px;
  font-weight: 800;
}

.remove-search input::placeholder {
  color: #516258;
}

.remove-search input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(57, 255, 20, 0.1);
}

.remove-client-list {
  min-height: 0;
  max-height: none;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding-right: 4px;
  scrollbar-color: rgba(255, 98, 98, 0.62) #111816;
  scrollbar-width: thin;
}

.remove-client-list::-webkit-scrollbar {
  width: 10px;
}

.remove-client-list::-webkit-scrollbar-track {
  background: #111816;
}

.remove-client-list::-webkit-scrollbar-thumb {
  border: 2px solid #111816;
  border-radius: 999px;
  background: rgba(255, 98, 98, 0.62);
}

.remove-client-row {
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(201, 218, 205, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.remove-client-row:hover {
  border-color: rgba(255, 98, 98, 0.24);
  background: rgba(255, 98, 98, 0.045);
}

.remove-client-details {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.remove-client-details strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.remove-client-details span {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.remove-client-action {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid rgba(255, 98, 98, 0.36);
  border-radius: 8px;
  background: rgba(255, 98, 98, 0.09);
  color: #ff9a9a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.remove-client-action:hover {
  border-color: rgba(255, 98, 98, 0.68);
  background: rgba(255, 98, 98, 0.16);
  color: #ffd1d1;
}

.remove-client-empty {
  min-height: 130px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 7px;
  border: 1px dashed rgba(201, 218, 205, 0.16);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.remove-client-empty[hidden] {
  display: none;
}

.remove-client-empty strong {
  color: var(--text);
}

.remove-confirm-card {
  min-height: 0;
  display: grid;
  gap: 14px;
  align-content: start;
  border: 1px solid rgba(255, 98, 98, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 98, 98, 0.12), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    #0b100d;
  padding: 18px;
  overflow: auto;
}

.remove-confirm-card[hidden] {
  display: none;
}

.remove-confirm-card span {
  color: #ff9a9a;
  font-size: 11px;
  font-weight: 900;
}

.remove-confirm-card h3 {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 22px;
  line-height: 1.1;
}

.remove-confirm-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.remove-confirm-card code {
  display: block;
  width: 100%;
  border: 1px solid rgba(255, 98, 98, 0.3);
  border-radius: 8px;
  background: rgba(255, 98, 98, 0.08);
  color: #ffd1d1;
  padding: 12px;
  white-space: normal;
  overflow-wrap: anywhere;
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
}

.remove-confirm-target {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(201, 218, 205, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
}

.remove-confirm-target strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.remove-confirm-target small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.remove-confirm-label {
  display: grid;
  gap: 8px;
}

.remove-confirm-label input {
  min-height: 48px;
  width: 100%;
  border: 1px solid rgba(255, 98, 98, 0.32);
  border-radius: 8px;
  outline: 0;
  background: #050e08;
  color: var(--text);
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
}

.remove-confirm-label input::placeholder {
  color: #6b7470;
}

.remove-confirm-label input:focus {
  border-color: rgba(255, 98, 98, 0.78);
  box-shadow: 0 0 0 3px rgba(255, 98, 98, 0.12);
}

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

.app-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1600;
  min-width: min(320px, calc(100vw - 32px));
  max-width: min(420px, calc(100vw - 32px));
  border: 1px solid rgba(57, 255, 20, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(57, 255, 20, 0.14), rgba(57, 255, 20, 0.04)),
    #071009;
  color: var(--text);
  padding: 14px 16px;
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.35;
  overflow-wrap: anywhere;
  transform: translateY(14px);
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.app-toast[hidden] {
  display: none;
}

@media (max-width: 760px) {
  .automation-main {
    width: min(100% - 20px, 1180px);
    padding: 14px 0 28px;
  }

  .breadcrumb {
    flex-wrap: wrap;
    margin-bottom: 14px;
  }

  .page-hero {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 12px 0 18px;
  }

  .page-hero h1 {
    font-size: clamp(27px, 8.6vw, 38px);
    line-height: 1.08;
  }

  .page-hero p:last-child {
    font-size: 13px;
  }

  .hero-stat {
    justify-items: start;
    min-height: 74px;
    padding: 13px 16px;
  }

  .hero-stat span {
    font-size: 34px;
  }

  .control-panel {
    margin: 14px 0;
    padding: 14px;
    gap: 11px;
  }

  .squad-filter {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
    margin-inline: -2px;
    padding: 0 2px 5px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }

  .squad-filter::-webkit-scrollbar {
    display: none;
  }

  .squad-chip {
    flex: 0 0 auto;
    min-width: 96px;
    scroll-snap-align: start;
  }

  .filter-search-row {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .search-bar {
    min-height: 46px;
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .search-bar input {
    font-size: 13px;
  }

  .clear-btn {
    width: 100%;
    min-height: 46px;
  }

  .board-head {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
  }

  .board-head h2 {
    font-size: 16px;
    line-height: 1.24;
  }

  .board-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
    gap: 8px;
  }

  .add-client-btn,
  .edit-client-btn,
  .remove-client-btn {
    min-height: 44px;
    width: 100%;
  }

  .client-row {
    grid-template-columns: 1fr;
    gap: 9px;
    min-height: 0;
    padding: 13px 14px;
  }

  .client-row-head {
    display: none;
  }

  .client-list {
    max-height: min(58svh, 560px);
    overflow: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .squad-name {
    width: max-content;
    max-width: 100%;
    min-width: 78px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .company-name {
    font-size: 14px;
  }

  .send-name {
    font-size: 13px;
  }

  .company-name::before {
    content: "EMPRESA";
    display: block;
    margin-bottom: 4px;
    color: var(--soft);
    font-size: 10px;
    font-weight: 900;
  }

  .send-name::before {
    content: "NOME SEND/UNNI";
    display: block;
    margin-bottom: 4px;
    color: var(--soft);
    font-size: 10px;
    font-weight: 900;
  }

  .client-modal {
    align-items: end;
    padding: 12px;
  }

  .client-modal-card {
    width: min(100%, 430px);
    max-height: calc(100svh - 24px);
  }

  .client-modal-head {
    padding: 18px 18px 15px;
  }

  .client-modal-head h2 {
    font-size: 22px;
  }

  .client-form {
    gap: 13px;
    padding: 18px;
  }

  .client-form input,
  .client-form select,
  .custom-select-button {
    min-height: 48px;
  }

  .remove-modal-card,
  .edit-modal-card {
    max-height: calc(100svh - 24px);
  }

  .edit-client-panel,
  .remove-client-panel {
    padding: 16px;
  }

  .edit-list-view,
  .remove-list-view {
    gap: 12px;
  }

  .edit-search input,
  .remove-search input {
    min-height: 48px;
    font-size: 13px;
  }

  .client-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .edit-form-actions,
  .remove-confirm-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .edit-client-row,
  .remove-client-row {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
    min-height: auto;
    padding: 11px;
  }

  .edit-client-action,
  .remove-client-action {
    min-height: 42px;
    width: 100%;
  }

  .remove-confirm-card {
    padding: 14px;
  }

  .remove-confirm-card h3 {
    font-size: 20px;
  }

  .remove-confirm-card code {
    font-size: 12px;
  }

  .app-toast {
    right: 16px;
    bottom: 16px;
    left: 16px;
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 380px) {
  .automation-main {
    width: min(100% - 16px, 1180px);
  }

  .page-hero h1 {
    font-size: 26px;
  }

  .control-panel,
  .board-head {
    padding: 13px;
  }

  .client-row {
    padding: 12px;
  }

  .modal-close-btn,
  .modal-secondary-btn,
  .modal-primary-btn,
  .modal-danger-btn {
    min-height: 42px;
    padding-inline: 12px;
  }
}
