.ai-intro {
  text-align: center;
  padding: 5px 0 13px;
}
.ai-orb {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, #344b58, #283340);
  color: #8beaee;
  font-size: 29px;
  box-shadow: 0 0 22px #50baa014;
}
.ai-intro h3 {
  font-size: 16px;
  letter-spacing: -0.4px;
  margin: 13px 0 7px;
}
.ai-intro p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.8;
}
.ai-switch,
.ai-check {
  display: flex !important;
  align-items: center;
  gap: 8px;
  color: #d1d9e0 !important;
  font-size: 11px;
}
.ai-switch {
  justify-content: center;
  margin-top: 15px;
}
.ai-switch input,
.ai-check input,
.ai-key-options input {
  accent-color: var(--accent);
}
.ai-tool-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ai-tool-list button {
  padding: 10px 9px;
  background: #232a31;
  text-align: left;
  justify-content: start;
  white-space: normal;
}
.ai-tool-list button > span {
  font-size: 18px;
  color: #a4e8dc;
  width: 24px;
  flex-shrink: 0;
}
.ai-tool-list button div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ai-tool-list b {
  font-size: 11px;
  font-weight: 600;
}
.ai-tool-list small {
  font-size: 9px;
  color: var(--muted);
  line-height: 1.5;
}
.ai-tool-list i {
  font-style: normal;
  color: #728797;
}
.ai-tool-list button:hover {
  background: #2b393f;
}
.ai-modal {
  width: 1040px;
  padding: 23px;
}
.ai-settings,
.ai-workspace {
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr);
  gap: 25px;
}
.ai-settings > aside,
.ai-workspace > aside {
  border-right: 1px solid var(--line);
  padding-right: 20px;
}
.ai-profile {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: start;
  padding: 13px 10px;
  gap: 6px;
  margin-bottom: 6px;
  background: #272e36;
  white-space: normal;
  text-align: left;
}
.ai-profile.active {
  border-color: var(--accent);
}
.ai-profile small {
  color: var(--muted);
  font-size: 10px;
}
.ai-form-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 12px;
}
.ai-form-heading h3 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.4px;
  margin: 0;
}
.ai-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ai-form-grid label {
  margin-top: 10px;
}
.ai-secret-row {
  display: flex;
  gap: 8px;
}
.ai-secret-row input {
  flex: 1;
  min-width: 0;
}
.ai-secret-row button {
  background: #303a44;
}
.ai-key-options {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 3px 0 14px;
}
.ai-key-options label {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 10px;
}
.ai-custom-fields textarea,
.ai-task textarea {
  width: 100%;
  background: #131a20;
  border: 1px solid #39444e;
  border-radius: 6px;
  color: var(--text);
  padding: 12px;
  font:
    12px "Segoe UI",
    sans-serif;
  line-height: 1.6;
  resize: vertical;
}
.ai-custom-fields {
  border-left: 2px solid #3e7169;
  padding-left: 13px;
  margin-top: 14px;
}
.ai-settings-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 23px;
  flex-wrap: wrap;
}
.ai-settings-actions a {
  font-size: 11px;
}
.ai-settings-actions > div {
  display: flex;
  gap: 5px;
}
.ai-sidebar-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 22px;
}
.ai-sidebar-heading .ai-orb {
  width: 33px;
  height: 33px;
  font-size: 24px;
}
.ai-workspace-tools {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.ai-workspace-tools button {
  justify-content: start;
  text-align: left;
  gap: 10px;
  font-size: 11px;
  padding: 12px 7px;
}
.ai-workspace-tools button > span {
  width: 22px;
  font-size: 17px;
  color: #80c8bd;
}
.ai-workspace-tools button.active {
  background: #293f3d;
  color: var(--accent);
}
.ai-task-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin: 18px 0;
}
.ai-task-actions > span {
  margin-right: auto;
  max-width: 58%;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.ai-request-preview {
  padding: 16px;
  border: 1px solid #417568;
  background: #1a302b;
  border-radius: 8px;
  margin-top: 17px;
}
.ai-preview-title {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
}
.ai-preview-title span {
  font-size: 9px;
  color: #aac2b9;
}
.ai-request-preview dl {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 9px;
  font-size: 11px;
  line-height: 1.5;
  margin: 17px 0;
}
.ai-request-preview dt {
  color: #9ebbb1;
}
.ai-request-preview dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.ai-request-preview details {
  color: #aec9bf;
  font-size: 10px;
  margin: 15px 0;
}
.ai-request-preview pre {
  max-height: 200px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: #13241f;
  padding: 10px;
  border-radius: 4px;
  color: #dbe9e2;
  font:
    10px Consolas,
    monospace;
}
.ai-request-preview button {
  display: flex;
  margin-left: auto;
}
.ai-results {
  padding: 18px;
  background: #171e25;
  border: 1px solid #35414c;
  border-radius: 8px;
  margin-top: 16px;
  min-height: 150px;
}
.ai-results-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
}
.ai-results-empty > span {
  font-size: 32px;
  color: #5d8b8f;
  margin-bottom: 11px;
}
.ai-results-empty b {
  font-size: 13px;
  font-weight: 500;
}
.ai-results-empty p {
  font-size: 11px;
  max-width: 300px;
}
.ai-results-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}
.ai-results-heading span {
  font-size: 10px;
  color: var(--muted);
}
.ai-result-actions {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 12px;
}
.ai-job {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  color: var(--muted);
  font-size: 10px;
  border-bottom: 1px solid #ffffff08;
}
.ai-job b {
  font-weight: 500;
  color: #91d8c2;
}
.ai-error,
#aiSettingsStatus {
  color: #f0b1a4;
  font-size: 11px;
  line-height: 1.6;
  margin-top: 10px;
}
.ai-generated-image {
  display: block;
  max-width: 100%;
  max-height: 290px;
  margin: auto;
  object-fit: contain;
  border-radius: 5px;
}
.ai-generated-media {
  display: block;
  width: 100%;
  max-height: 280px;
}
.ai-srt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.ai-task {
  min-width: 0;
}
.ai-task .eyebrow {
  margin: 0 0 6px;
}
.ai-modal .note b {
  color: #c7e3db;
}
.ai-modal .ai-task .note {
  margin: 10px 0 0;
}
.ai-task > textarea {
  min-height: 100px;
}
.ai-profile-editor {
  min-width: 0;
}
@media (max-width: 800px) {
  .ai-settings,
  .ai-workspace {
    grid-template-columns: 165px minmax(0, 1fr);
    gap: 15px;
  }
  .ai-form-grid {
    grid-template-columns: 1fr;
  }
  .ai-modal {
    padding: 15px;
  }
  .ai-form-heading .chip {
    display: none;
  }
  .ai-request-preview dl {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .ai-request-preview dd {
    margin-bottom: 8px;
  }
  .ai-preview-title {
    flex-direction: column;
    align-items: start;
  }
}
