/* TikTok: Animated logout button (Disconnect) */
.tt-logout.logoutButton {
  --figure-duration: 100ms;
  --transform-figure: none;
  --walking-duration: 100ms;
  --transform-arm1: none;
  --transform-wrist1: none;
  --transform-arm2: none;
  --transform-wrist2: none;
  --transform-leg1: none;
  --transform-calf1: none;
  --transform-leg2: none;
  --transform-calf2: none;
  background: none;
  border: 0;
  cursor: pointer;
  display: block;
  font-size: 12px;
  font-weight: 600;
  height: 38px;
  outline: none;
  padding: 0 0 0 16px;
  perspective: 100px;
  position: relative;
  text-align: left;
  width: 140px;
  -webkit-tap-highlight-color: transparent;
}
.tt-logout.logoutButton::before {
  background-color: #2b3552;
  border-radius: 8px;
  content: "";
  display: block;
  height: 100%;
  left: 0;
  position: absolute;
  top: 0;
  transform: none;
  transition: transform 50ms ease;
  width: 100%;
  z-index: 2;
}
.tt-logout.logoutButton:hover .door {
  transform: rotateY(14deg);
}
.tt-logout.logoutButton:active::before {
  transform: scale(0.96);
}
.tt-logout.logoutButton:active .door {
  transform: rotateY(28deg);
}
.tt-logout.logoutButton.clicked::before {
  transform: none;
}
.tt-logout.logoutButton.clicked .door {
  transform: rotateY(35deg);
}
.tt-logout.logoutButton.door-slammed .door {
  transform: none;
  transition: transform 100ms ease-in 250ms;
}
.tt-logout.logoutButton.falling {
  animation: tt-shake 200ms linear;
}
.tt-logout.logoutButton.falling .bang {
  animation: tt-flash 300ms linear;
}
.tt-logout.logoutButton.falling .figure {
  animation: tt-spin 1000ms infinite linear;
  bottom: -1080px;
  opacity: 0;
  right: 1px;
  transition:
    transform calc(var(--figure-duration) * 1ms) linear,
    bottom calc(var(--figure-duration) * 1ms) cubic-bezier(0.7, 0.1, 1, 1) 100ms,
    opacity calc(var(--figure-duration) * 0.25ms) linear calc(var(--figure-duration) * 0.75ms);
  z-index: 1;
}
.tt-logout.logoutButton .button-text {
  color: #f4f7ff;
  font-weight: 600;
  position: relative;
  z-index: 10;
}
.tt-logout.logoutButton svg {
  display: block;
  position: absolute;
}
.tt-logout.logoutButton .figure {
  bottom: 5px;
  fill: #7aa2ff;
  right: 18px;
  transform: var(--transform-figure);
  transition: transform calc(var(--figure-duration) * 1ms) cubic-bezier(0.2, 0.1, 0.8, 0.9);
  width: 28px;
  z-index: 4;
  shape-rendering: geometricPrecision;
}
.tt-logout.logoutButton .figure *{
  fill: #7aa2ff;
  stroke: none;
}
.tt-logout.logoutButton .door,
.tt-logout.logoutButton .doorway {
  bottom: 4px;
  fill: #e8eeff;
  right: 12px;
  width: 30px;
}
.tt-logout.logoutButton .door {
  transform: none;
  transform-origin: 100% 50%;
  transform-style: preserve-3d;
  transition: transform 200ms ease;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  z-index: 5;
}
.tt-logout.logoutButton .door path {
  fill: #7aa2ff;
  stroke: #7aa2ff;
  stroke-width: 4;
}
.tt-logout.logoutButton .door circle {
  fill: #d6e5ff;
}
.tt-logout.logoutButton .doorway {
  z-index: 3;
}
.tt-logout.logoutButton .bang {
  opacity: 0;
  fill: #ffe57a;
}
.tt-logout.logoutButton .arm1,
.tt-logout.logoutButton .wrist1,
.tt-logout.logoutButton .arm2,
.tt-logout.logoutButton .wrist2,
.tt-logout.logoutButton .leg1,
.tt-logout.logoutButton .calf1,
.tt-logout.logoutButton .leg2,
.tt-logout.logoutButton .calf2 {
  transition: transform calc(var(--walking-duration) * 1ms) ease-in-out;
}
.tt-logout.logoutButton .arm1 { transform: var(--transform-arm1); transform-origin: 52% 45%; }
.tt-logout.logoutButton .wrist1 { transform: var(--transform-wrist1); transform-origin: 59% 55%; }
.tt-logout.logoutButton .arm2 { transform: var(--transform-arm2); transform-origin: 47% 43%; }
.tt-logout.logoutButton .wrist2 { transform: var(--transform-wrist2); transform-origin: 35% 47%; }
.tt-logout.logoutButton .leg1 { transform: var(--transform-leg1); transform-origin: 47% 64.5%; }
.tt-logout.logoutButton .calf1 { transform: var(--transform-calf1); transform-origin: 55.5% 71.5%; }
.tt-logout.logoutButton .leg2 { transform: var(--transform-leg2); transform-origin: 43% 63%; }
.tt-logout.logoutButton .calf2 { transform: var(--transform-calf2); transform-origin: 41.5% 73%; }

@keyframes tt-spin {
  from { transform: rotate(0deg) scale(0.94); }
  to { transform: rotate(359deg) scale(0.94); }
}
@keyframes tt-shake {
  0% { transform: rotate(-1deg); }
  50% { transform: rotate(2deg); }
  100% { transform: rotate(-1deg); }
}
@keyframes tt-flash {
  0% { opacity: 0.4; }
  100% { opacity: 0; }
}

.cd-header{
  position: relative;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  z-index: 30;
  overflow: visible;
  /* Right padding reserves visual space so title doesn't crowd the abs. positioned slot */
  padding-right: var(--cd-space-5);
}

.cd-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  margin-bottom: 0;
  max-width: calc(100% - 250px);
}

.cd-title__icon {
  width: 50px;
  height: 50px;
  border-radius: 6px;
  flex: 0 0 auto;
}

.tt-profile-slot{
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 150px;
  max-width: min(44vw, 360px);
  z-index: 40;
}

.cd-lang-switch--header{
  flex: 0 0 auto;
}

.tt-header-connect{
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(63,233,255,.34);
  background: linear-gradient(180deg, rgba(26, 37, 58, .84), rgba(19, 27, 44, .76));
  color: #dff2ff;
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
}

.tt-header-connect:hover{
  border-color: rgba(63,233,255,.52);
  box-shadow: 0 0 0 1px rgba(63,233,255,.16), 0 0 14px rgba(63,233,255,.12);
}

.tt-profile-menu{
  position: relative;
  z-index: 50;
}

.tt-profile-menu > summary{
  margin-top: 0;
  list-style: none;
  cursor: pointer;
  height: 36px;
  min-width: 100px;
  max-width: min(30vw, 220px);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(26, 33, 50, .92), rgba(18, 24, 38, .82));
  color: #e6efff;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .01em;
  overflow: hidden;
}

/* ── Split-Button: unangemeldet ── */
.tt-trigger-anon{
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  width: 100%;
}
.tt-trigger-anon__left{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}
.tt-trigger-anon__left > span{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tt-trigger-anon__left > img{
  border-radius: 3px;
  flex-shrink: 0;
  object-fit: contain;
}
.tt-trigger-anon__sep{
  width: 1px;
  align-self: stretch;
  background: rgba(255,255,255,.18);
  margin: 7px 8px;
  flex-shrink: 0;
}
.tt-trigger-anon__right{
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.tt-trigger-anon__right > img{
  border-radius: 2px;
  object-fit: cover;
  opacity: .85;
}
.tt-trigger-anon__slash{
  font-size: 10px;
  color: rgba(255,255,255,.35);
  line-height: 1;
}

/* ── Auth-State: angemeldet ── */
.tt-trigger-auth{
  display: none;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  width: 100%;
  justify-content: space-between;
}
.tt-trigger-auth #ttStatusText{
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
}
.tt-profile-slot.is-connected .tt-trigger-auth{ display: inline-flex; }
.tt-profile-slot.is-connected .tt-trigger-anon{ display: none; }

.tt-profile-menu > summary::-webkit-details-marker{
  display: none;
}

.tt-profile-menu > summary::after{
  display: none;
}

.tt-profile-summary-icon{
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  opacity: .95;
  object-fit: contain;
}

.tt-profile-menu[open] > summary{
  border-color: rgba(63,233,255,.42);
  box-shadow: 0 0 0 1px rgba(63,233,255,.14), 0 0 12px rgba(63,233,255,.10);
}

.tt-profile-dropdown{
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: max-content;
  min-width: 0;
  max-width: min(92vw, 380px);
  padding: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.12);
  background: linear-gradient(180deg, rgba(20, 26, 41, .97), rgba(14, 19, 31, .95));
  box-shadow: 0 10px 28px rgba(0,0,0,.42), 0 0 0 1px rgba(63,233,255,.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
  z-index: 60;
}

.tt-profile-action{
  margin-top: 0;
  width: auto;
  min-width: 0;
  min-height: 36px;
  border-radius: 9px;
  border: 1px solid rgba(138,180,255,.30);
  background: rgba(47, 63, 99, .44);
  color: #e6efff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  text-align: left;
  white-space: nowrap;
  padding: 0 14px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
}

.tt-profile-action__label{
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.tt-profile-action__icon{
  flex: 0 0 auto;
  display: block;
  opacity: .94;
  margin: 0;
  max-width: none;
}

.tt-profile-action__icon--flag{
  width: 18px;
  min-width: 18px;
  max-width: 18px;
  height: 12px;
  min-height: 12px;
  max-height: 12px;
  border-radius: 2px;
  object-fit: cover;
}

.tt-profile-action__icon--tiktok{
  width: 16px;
  min-width: 16px;
  max-width: 16px;
  height: 16px;
  min-height: 16px;
  max-height: 16px;
  object-fit: contain;
}

.tt-profile-dropdown > a[data-lang-target]{
  text-decoration: none;
}

.tt-profile-dropdown > a[data-lang-target] img{
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 12px !important;
  min-height: 12px !important;
  max-height: 12px !important;
}

.tt-profile-dropdown .tt-logout.logoutButton{
  margin-top: 0;
  width: auto;
  max-width: none;
  min-width: 0;
}

.tt-profile-extras{
  margin-top: 2px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  background: rgba(255,255,255,.03);
  overflow: hidden;
}

.tt-profile-extras > summary{
  cursor: pointer;
  user-select: none;
  list-style: none;
  margin: 0;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 650;
  color: #d7e4ff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.tt-profile-extras > summary::-webkit-details-marker{
  display: none;
}

.tt-profile-extras[open] > summary{
  background: rgba(255,255,255,.03);
}

.tt-profile-extras .advanced__row{
  margin: 0;
  padding: 8px 10px 0;
}

.tt-profile-extras .advanced__item{
  gap: 6px;
}

.tt-profile-extras .advanced__item-help{
  margin-bottom: 0;
}

.tt-profile-extras .debug{
  margin: 8px 10px 10px;
}

.tt-profile-dropdown #clear{
  align-self: stretch;
}

.tt-profile-dropdown .advanced__meta-row{
  flex-direction: column;
  align-items: flex-start;
}

.tt-profile-dropdown #out{
  margin-top: 8px;
  max-height: 180px;
  max-width: 100%;
  overflow: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(138,180,255,.45) rgba(255,255,255,.06);
  font-size: 11px;
}

.tt-profile-dropdown #out::-webkit-scrollbar{
  width: 8px;
  height: 8px;
}

.tt-profile-dropdown #out::-webkit-scrollbar-thumb{
  border-radius: 999px;
  background: rgba(138,180,255,.42);
}

.tt-profile-dropdown #out::-webkit-scrollbar-track{
  border-radius: 999px;
  background: rgba(255,255,255,.06);
}

.tt-profile-dropdown #out::-webkit-scrollbar-button{
  display: none;
  width: 0;
  height: 0;
}

.tt-profile-action:hover{
  border-color: rgba(138,180,255,.50);
  background: rgba(59, 79, 121, .52);
}

.tt-profile-action--danger{
  border-color: rgba(255, 95, 125, .38);
  background: rgba(85, 34, 48, .42);
  color: #ffd8df;
}

.tt-profile-action--danger:hover{
  border-color: rgba(255, 95, 125, .56);
  background: rgba(102, 40, 56, .50);
}

.tt-profile-action--lang{
  border-color: rgba(138, 180, 255, .34);
  background: rgba(45, 63, 100, .46);
  color: #e6efff;
  text-decoration: none;
}

.tt-profile-action--lang:hover{
  border-color: rgba(138, 180, 255, .52);
  background: rgba(58, 80, 126, .54);
}

.tt-profile-action:disabled,
.tt-profile-action.is-busy{
  opacity: .6;
  cursor: not-allowed;
  box-shadow: none;
}

.cd-header-hint{
  display: block;
  margin: -2px 0 12px;
  text-align: right;
  font-size: 12px;
}

/* Step 2: component hierarchy + calmer TikTok action layout */
.cd-status-col .status-line{
  margin-top: 0;
}

/* Priority pass: CTA dominance + clearer two-column hierarchy */
.cd-main-col{
  grid-area: main;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(138,180,255,.24);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(17, 24, 38, .82), rgba(12, 18, 30, .74));
  box-shadow: inset 0 0 0 1px rgba(138,180,255,.05);
}

.cd-method-card:not(.is-active){
  opacity: .94;
  border-color: rgba(255,255,255,.12);
}

.cd-method-card:not(.is-active) .cd-method-card__head{
  color: #cad7ec;
}

#go.glow-on-hover{
  margin-top: 0;
  width: auto;
  min-width: 220px;
  max-width: 100%;
  padding: 0 20px;
  white-space: nowrap;
  text-align: center;
  line-height: 1.05;
}

#go.glow-on-hover.is-busy,
#go.glow-on-hover.is-loading,
#go.glow-on-hover:disabled{
  opacity: .86;
  cursor: wait;
  filter: saturate(.8);
  pointer-events: none;
}
#go.is-loading .cd-spinner{
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border-width: 2.5px;
  opacity: .9;
}

@media (max-width: 700px){
  .cd-header{
    justify-content: flex-start;
    padding-right: var(--cd-space-4); /* card padding at mobile is 16px */
  }

  .tt-profile-slot{
    min-width: 0;
    max-width: min(55vw, 220px);
    gap: 5px;
  }

  .tt-profile-slot .cd-theme-switch{
    width: 32px;
    height: 32px;
  }

  /* Credits badge: kompakt auf Mobile — kein Text-Overflow, nur Icon + Zahl */
  .cd-credits-badge{
    height: 30px;
    padding: 0 8px;
    font-size: 11px;
    gap: 3px;
  }

  .tt-profile-slot.is-connected .cd-lang-switch--header{
    display: none;
  }

  .cd-lang-switch--header{
    min-height: 32px;
    padding: 0 8px;
  }

  .cd-lang-switch--header .cd-lang-switch__code{
    display: none;
  }

  .tt-profile-menu > summary{
    height: 34px;
    min-width: 88px;
    max-width: min(52vw, 170px);
    padding: 0 10px;
  }

  .tt-profile-dropdown{
    width: max-content;
    max-width: calc(100vw - 24px);
    min-width: 0;
  }

  .cd-title{
    justify-content: flex-start;
    text-align: left;
    max-width: calc(100% - 220px);
    gap: 8px;
    font-size: 24px;
  }

  .cd-title__icon{
    width: 34px;
    height: 34px;
  }

  #go.glow-on-hover{
    width: min(92vw, 320px);
    min-width: 0;
  }

  .job-history__actions{
    min-width: 0;
  }
}

/* Narrow mobile: slim title + small logo */
@media (max-width: 420px){
  .cd-title{
    max-width: calc(100% - 195px);
    font-size: 21px;
  }

  .cd-title__icon{
    width: 26px;
    height: 26px;
  }

  .tt-profile-slot{
    max-width: min(60vw, 240px);
  }

  .tt-profile-menu > summary{
    max-width: min(44vw, 150px);
    min-width: 76px;
    font-size: 11px;
  }
}

/* App polish: clearer center contrast + subtle floating interactions */
body.page-app .cd-main-col{
  border-color: rgba(154, 191, 247, .30);
  background: linear-gradient(180deg, rgba(18, 27, 44, .90), rgba(11, 18, 31, .86));
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    inset 0 0 0 1px rgba(138,180,255,.07),
    0 12px 28px rgba(0,0,0,.24);
}

body.page-app .cd-method-card{
  border-color: rgba(134, 170, 226, .28);
  background: linear-gradient(180deg, rgba(21, 32, 51, .86), rgba(12, 20, 34, .84));
}

body.page-app .cd-method-card.is-active{
  border-color: rgba(152, 191, 252, .42);
  box-shadow:
    0 0 0 1px rgba(152,191,252,.16),
    0 12px 24px rgba(0,0,0,.26);
}

body.page-app .cd-primary-mode-switch,
body.page-app .cd-generate-mode-switch{
  background: rgba(10, 16, 28, .78);
  border-color: rgba(138,180,255,.30);
}

body.page-app .today-ops,
body.page-app .job-history{
  border-color: rgba(146, 183, 242, .28);
}

body.page-app #go.glow-on-hover,
body.page-app .cd-primary-mode-btn,
body.page-app .cd-generate-mode-btn,
body.page-app .cd-enhance-btn,
body.page-app .today-ops__action,
body.page-app .job-history__filter,
body.page-app .job-history__download,
body.page-app .job-history__captions,
body.page-app .job-history__upload,
body.page-app .job-history__delete,
body.page-app .job-history__toggle{
  transition:
    transform 140ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
  will-change: transform;
}

body.page-app #go.glow-on-hover:hover,
body.page-app .cd-primary-mode-btn:hover,
body.page-app .cd-generate-mode-btn:hover,
body.page-app .cd-enhance-btn:hover,
body.page-app .today-ops__action:hover,
body.page-app .job-history__filter:hover,
body.page-app .job-history__download:hover,
body.page-app .job-history__captions:hover,
body.page-app .job-history__upload:hover,
body.page-app .job-history__delete:hover,
body.page-app .job-history__toggle:hover{
  transform: translateY(-1.5px);
  box-shadow: 0 8px 16px rgba(0,0,0,.26);
}

body.page-app #go.glow-on-hover:active,
body.page-app .cd-primary-mode-btn:active,
body.page-app .cd-generate-mode-btn:active,
body.page-app .cd-enhance-btn:active,
body.page-app .today-ops__action:active,
body.page-app .job-history__filter:active,
body.page-app .job-history__download:active,
body.page-app .job-history__captions:active,
body.page-app .job-history__upload:active,
body.page-app .job-history__delete:active,
body.page-app .job-history__toggle:active{
  transform: translateY(0) scale(.985);
}

body.page-app #go.glow-on-hover.is-busy,
body.page-app #go.glow-on-hover:disabled,
body.page-app .cd-enhance-btn:disabled,
body.page-app .job-history__upload:disabled,
body.page-app .job-history__delete:disabled{
  transform: none;
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce){
  body.page-app #go.glow-on-hover,
  body.page-app .cd-primary-mode-btn,
  body.page-app .cd-generate-mode-btn,
  body.page-app .cd-enhance-btn,
  body.page-app .today-ops__action,
  body.page-app .job-history__filter,
  body.page-app .job-history__download,
  body.page-app .job-history__captions,
  body.page-app .job-history__upload,
  body.page-app .job-history__delete,
  body.page-app .job-history__toggle{
    transition: none !important;
    transform: none !important;
  }
}

/* /app: clean card layout toolkit (structure-only, no feature changes) */
body.page-app .cd-card{
  padding: var(--cd-space-5);
  border-radius: 14px;
}

body.page-app .cd-card__header{
  margin-bottom: var(--cd-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--cd-space-2);
}

body.page-app .cd-card__header--compact{
  margin-bottom: var(--cd-space-3);
}

body.page-app .cd-card__title{
  margin: 0;
  line-height: 1.25;
}

body.page-app h2.cd-card__title{
  font-size: 25px;
  font-weight: 760;
}

body.page-app h3.cd-card__title{
  font-size: 23px;
  font-weight: 750;
}

body.page-app .cd-card__subtitle{
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--cd-text-muted);
}

body.page-app .cd-grid{
  display: grid;
  gap: var(--cd-space-4);
}

body.page-app .cd-grid--app-tool{
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  align-items: start;
  column-gap: 18px;
}

body.page-app .cd-col{
  min-width: 0;
}

body.page-app .cd-col--controls{
  display: grid;
  gap: var(--cd-space-4);
  align-content: start;
  min-width: 0;
  border-left: 1px solid rgba(138,180,255,.08);
  padding-left: var(--cd-space-4);
}

body.page-app .cd-field{
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.page-app .cd-field__label{
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .01em;
  color: #c6d6ee;
}

body.page-app .cd-field__help{
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: #9fb3d4;
}

body.page-app .cd-field__hint{
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  color: #ffb347;
}

/* Token abgelaufen: Profil-Pill amber umranden */
.tt-profile-slot.is-token-expired .tt-profile-menu > summary{
  border-color: rgba(255,179,71,.55);
  box-shadow: 0 0 0 1px rgba(255,179,71,.18), 0 0 10px rgba(255,179,71,.12);
}

body.page-app .cd-field select{
  margin-top: 0;
  min-height: 40px;
  border: 1px solid rgba(98, 116, 150, .56);
  background: linear-gradient(180deg, rgba(14, 22, 38, .96), rgba(10, 16, 28, .98));
  color: #d8e8ff;
  font-family: 'Inter', system-ui, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  border-radius: 9px;
  padding: 0 32px 0 12px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(138,180,255,.60)' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
body.page-app .cd-field select:hover{
  border-color: rgba(138,180,255,.48);
}
body.page-app .cd-field select:focus{
  outline: none;
  border-color: rgba(138,180,255,.56);
  box-shadow: 0 0 0 2px rgba(138,180,255,.10);
}

body.page-app .cd-field .switch{
  margin-top: 0;
  opacity: 1;
  align-self: flex-start;
}

body.page-app .cd-core-connection{
  padding-top: 2px;
}

body.page-app .cd-core-connection .cd-field__help{
  font-size: 11px;
  color: rgba(138,180,255,.35);
  line-height: 1.3;
}

body.page-app .cd-core-connection__connect{
  display: flex;
  width: 100%;
  max-width: 100%;
  min-height: 40px;
  box-sizing: border-box;
  justify-content: center;
}

body.page-app .cd-core-tool .cd-input-shell{
  position: relative;
  height: 208px;
  min-height: 208px;
  max-height: 208px;
  border-radius: 10px;
  border: 1px solid rgba(98, 116, 150, .56);
  background: #0b1019;
}

body.page-app .cd-core-tool__hint{
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: #b3c5e1;
  width: 100%;
  max-width: none;
  text-align: center;
}

body.page-app .cd-actions{
  display: flex;
  gap: var(--cd-space-3);
  flex-wrap: wrap;
}

body.page-app .cd-actions--primary{
  margin-top: var(--cd-space-4);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--cd-space-2);
}

body.page-app .cd-actions--secondary{
  justify-content: flex-start;
  width: 100%;
}

body.page-app .cd-actions--primary .glow-on-hover::before{
  background: linear-gradient(135deg, #1648b0, #0099cc, #3f7fff, #00c4e8, #1648b0);
  background-size: 250%;
}

body.page-app .cd-actions--primary .glow-on-hover{
  margin-top: 0;
  margin-left: 0;
  min-width: 240px;
}

body.page-app .cd-card__feedback{
  margin-top: var(--cd-space-3);
  display: flex;
  flex-direction: column;
  gap: var(--cd-space-3);
}

body.page-app .cd-card__feedback .status-line{
  margin-top: 0;
}

body.page-app .cd-core-tool .actions{
  margin-top: 0;
  justify-content: flex-start;
  align-items: center;
}

body.page-app .cd-core-tool .actions a,
body.page-app .cd-core-tool .actions .cd-btn{
  margin-top: 0;
  min-width: 120px;
  height: 36px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  filter: none;
}

body.page-app .cd-core-tool .actions .cd-btn{
  border: 1px solid rgba(138,180,255,.34);
  background: linear-gradient(160deg, rgba(53, 97, 173, .90), rgba(38, 72, 130, .92));
  box-shadow: none;
}

body.page-app .cd-core-tool .actions .cd-btn:hover{
  box-shadow: 0 0 0 1px rgba(138,180,255,.24), 0 8px 16px rgba(0,0,0,.20);
}

body.page-app .cd-core-tool .actions .cd-btn::before,
body.page-app .cd-core-tool .actions .cd-btn::after{
  display: none;
}

body.page-app .cd-recent-list{
  gap: var(--cd-space-2);
}

@media (max-width: 980px){
  body.page-app .cd-grid--app-tool{
    grid-template-columns: 1fr;
    column-gap: 0;
  }

  body.page-app .cd-col--controls{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-left: none;
    border-top: 1px solid rgba(138,180,255,.08);
    padding-left: 0;
    padding-top: var(--cd-space-4);
  }

  body.page-app .cd-field--switch,
  body.page-app .cd-core-connection{
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px){
  body.page-app .cd-card{
    padding: var(--cd-space-4);
  }

  body.page-app .cd-col--controls{
    grid-template-columns: 1fr;
    gap: var(--cd-space-3);
  }

  body.page-app .cd-core-tool .cd-input-shell{
    height: 176px;
    min-height: 176px;
    max-height: 176px;
  }

  body.page-app .cd-actions--primary{
    flex-direction: column;
    align-items: stretch;
  }

  body.page-app .cd-actions--primary .glow-on-hover{
    width: 100%;
    min-width: 0;
  }

  body.page-app .cd-actions--secondary{
    justify-content: stretch;
  }

  body.page-app .cd-actions--secondary .cd-btn,
  body.page-app .cd-actions--secondary a{
    width: 100%;
    min-width: 0;
    justify-content: center;
  }
}
