/* ════════════════════════════════════════════════════════════════════════
 *  Configuração da Exther — IDENTIDADE VISUAL ROBUSTA v4.0
 * ════════════════════════════════════════════════════════════════════════
 *
 *  ESTRATÉGIA: HERDAR DO BODY ao invés de chumbar variáveis.
 *
 *  O ExcFlow seta `body { background: ... !important; color: ... !important }`
 *  no aplicarTema(). Então o body SEMPRE tem cores certas do tema atual.
 *
 *  Portanto:
 *  - Container raiz: background TRANSPARENTE → mostra body
 *  - Texto: color: inherit → puxa do body
 *  - Fundos sutis: rgba(127,127,127,X) → escurece sobre claro,
 *                                          clareia sobre escuro
 *  - Acento: var(--terracota) — única variável necessária
 *
 *  Funciona em qualquer tema, qualquer config de variáveis.
 * ════════════════════════════════════════════════════════════════════════ */

/* Container raiz — TRANSPARENTE */
#screen-admin-exther,
#iris-cfg-conteudo {
  background: transparent !important;
  color: inherit;
  padding: 24px;
  min-height: 100%;
}

/* ═══ CARDS PRINCIPAIS ═════════════════════════════════════════════════ */
.iris-cfg-card {
  background: rgba(127, 127, 127, 0.08);
  border: 1px solid rgba(127, 127, 127, 0.2);
  border-left: 3px solid var(--terracota, #C4714A);
  border-radius: 0;
  padding: 20px 24px;
  margin-bottom: 16px;
  box-shadow: none;
  color: inherit;
}

.iris-cfg-card-hdr {
  font-size: 18px;
  font-weight: bold;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.iris-cfg-card-sub {
  font-size: 12px;
  opacity: 0.65;
  font-style: italic;
  margin-top: 4px;
}

/* Logo EX (terracota sempre — cor de marca) */
.exther-cfg-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--terracota, #C4714A);
  color: #fff;
  font-family: Georgia, 'Times New Roman', serif;
  font-style: italic;
  font-weight: bold;
  font-size: 16px;
  letter-spacing: -0.5px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* ═══ TÍTULOS DE SEÇÃO ═════════════════════════════════════════════════ */
.iris-cfg-section-title {
  font-size: 10px;
  font-weight: bold;
  color: var(--terracota, #C4714A);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(127, 127, 127, 0.25);
}

.iris-cfg-section-sub {
  font-size: 11px;
  opacity: 0.6;
  margin-bottom: 14px;
}

/* ═══ RADIOS PROVEDOR ═════════════════════════════════════════════════ */
.iris-cfg-radios {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.iris-cfg-radios label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(127, 127, 127, 0.08);
  border: 1px solid rgba(127, 127, 127, 0.2);
  border-radius: 0;
  cursor: pointer;
  font-size: 13px;
  color: inherit;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
}

.iris-cfg-radios label:hover {
  border-color: var(--terracota, #C4714A);
  background: rgba(196, 113, 74, 0.08);
}

.iris-cfg-radios input[type="radio"] {
  accent-color: var(--terracota, #C4714A);
}

/* Tags GRATUITO / PAGO */
.iris-tag {
  margin-left: auto;
  padding: 3px 10px;
  font-size: 9px;
  font-weight: bold;
  letter-spacing: 1px;
  border-radius: 3px;
  text-transform: uppercase;
}

.iris-tag-free {
  background: #2D7A3A;
  color: #fff;
}

.iris-tag-paid {
  background: var(--terracota, #C4714A);
  color: #fff;
}

/* ═══ GRUPOS DE CAMPO ══════════════════════════════════════════════════ */
.iris-cfg-grupo {
  margin-bottom: 14px;
}

.iris-cfg-grupo label {
  display: block;
  font-size: 9px;
  font-weight: bold;
  opacity: 0.65;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.iris-cfg-grupo select,
.iris-cfg-grupo input[type="text"],
.iris-cfg-grupo input[type="password"] {
  width: 100%;
  background: rgba(127, 127, 127, 0.08);
  color: inherit;
  border: none;
  border-bottom: 1.5px solid rgba(127, 127, 127, 0.3);
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
  border-radius: 0;
  font-family: inherit;
}

.iris-cfg-grupo input::placeholder {
  color: inherit;
  opacity: 0.45;
}

.iris-cfg-grupo select:focus,
.iris-cfg-grupo input:focus {
  border-bottom-color: var(--terracota, #C4714A);
  background: rgba(196, 113, 74, 0.06);
}

/* Options do select — desktop não consegue herdar bem, então usamos
   color-scheme pra navegador desenhar com cores certas do tema */
.iris-cfg-grupo select {
  color-scheme: light dark;
}

.iris-cfg-hint {
  font-size: 11px;
  opacity: 0.7;
  margin-top: 6px;
}

.iris-cfg-hint a {
  color: var(--terracota, #C4714A);
  text-decoration: none;
  font-weight: bold;
  opacity: 1;
}

.iris-cfg-hint a:hover {
  text-decoration: underline;
}

/* ═══ BOTÕES ═══════════════════════════════════════════════════════════ */
.iris-cfg-btn-test,
.iris-cfg-btn-save,
.iris-cfg-btn-add {
  background: var(--terracota, #C4714A);
  color: #fff;
  /* text-shadow sutil melhora legibilidade em terracotas claras (âmbar dourado etc) */
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  border: none;
  padding: 10px 20px;
  font-size: 12px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0;
  transition: filter 0.15s;
  font-family: inherit;
}

.iris-cfg-btn-test:hover,
.iris-cfg-btn-save:hover,
.iris-cfg-btn-add:hover {
  filter: brightness(0.9);
}

.iris-cfg-btn-add {
  font-size: 10px;
  padding: 4px 10px;
  margin-left: 12px;
  vertical-align: middle;
}

.iris-cfg-test-result {
  margin-top: 12px;
  padding: 10px 14px;
  font-size: 12px;
  border-radius: 0;
  border-left: 3px solid rgba(127, 127, 127, 0.5);
  background: rgba(127, 127, 127, 0.08);
  color: inherit;
}

.iris-cfg-test-ok { border-left-color: #2D7A3A; }
.iris-cfg-test-erro { border-left-color: #E55A3F; }
.iris-cfg-test-info { opacity: 0.7; }

/* ═══ SKILLS ═══════════════════════════════════════════════════════════ */
.iris-cfg-skills {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.iris-cfg-skill-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: rgba(127, 127, 127, 0.06);
  border: 1px solid transparent;
  font-size: 12px;
  cursor: pointer;
  color: inherit;
}

.iris-cfg-skill-row:hover {
  border-color: rgba(127, 127, 127, 0.3);
  background: rgba(196, 113, 74, 0.05);
}

.iris-cfg-skill-row input[type="checkbox"] {
  accent-color: var(--terracota, #C4714A);
}

.iris-cfg-skill-id {
  font-family: monospace;
  font-size: 11px;
  color: inherit;
}

/* ═══ SKILLS CUSTOM ═══════════════════════════════════════════════════ */
.iris-cfg-custom-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.iris-cfg-custom-row {
  background: rgba(127, 127, 127, 0.08);
  border: 1px solid rgba(127, 127, 127, 0.2);
  border-left: 3px solid var(--terracota, #C4714A);
  padding: 10px 14px;
  color: inherit;
}

.iris-cfg-custom-name {
  font-size: 13px;
  font-weight: bold;
  color: inherit;
  margin-bottom: 4px;
}

.iris-cfg-custom-preview {
  font-size: 11px;
  opacity: 0.65;
  margin-bottom: 8px;
  line-height: 1.4;
}

.iris-cfg-custom-btns {
  display: flex;
  gap: 6px;
}

.iris-cfg-custom-btns button {
  background: transparent;
  border: 1px solid rgba(127, 127, 127, 0.3);
  color: inherit;
  padding: 4px 10px;
  font-size: 10px;
  cursor: pointer;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-family: inherit;
}

.iris-cfg-custom-btns button:hover {
  border-color: var(--terracota, #C4714A);
  color: var(--terracota, #C4714A);
}

.iris-cfg-btn-danger {
  border-color: rgba(229, 90, 63, 0.5) !important;
  color: #E55A3F !important;
}

.iris-cfg-btn-danger:hover {
  background: #B83B1F !important;
  color: #fff !important;
  border-color: #B83B1F !important;
}

.iris-cfg-vazio {
  padding: 24px;
  text-align: center;
  opacity: 0.6;
  font-style: italic;
  font-size: 12px;
}

.iris-cfg-erro {
  padding: 14px;
  background: rgba(229, 90, 63, 0.12);
  border-left: 3px solid #B83B1F;
  color: #E55A3F;
  font-size: 12px;
}

/* ═══ ACTIONS ═════════════════════════════════════════════════════════ */
.iris-cfg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 0;
  margin-top: 16px;
}

.iris-cfg-actions .iris-cfg-btn-save {
  padding: 12px 32px;
  font-size: 13px;
}

/* ═══ BIBLIOTECA ═══════════════════════════════════════════════════════ */
.bib-loading,
.bib-vazio {
  padding: 24px;
  text-align: center;
  opacity: 0.65;
  font-size: 12px;
  font-style: italic;
}

.bib-erro {
  padding: 14px;
  background: rgba(229, 90, 63, 0.12);
  border-left: 3px solid #B83B1F;
  color: #E55A3F;
  font-size: 12px;
  text-align: left;
  font-style: normal;
}

.bib-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(127, 127, 127, 0.25);
}

.bib-stats {
  font-size: 11px;
  opacity: 0.7;
  letter-spacing: 0.5px;
}

.bib-stats strong {
  color: var(--terracota, #C4714A);
  font-size: 13px;
  opacity: 1;
}

.bib-btn-upload {
  background: var(--terracota, #C4714A);
  color: #fff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
  border: none;
  padding: 8px 18px;
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0;
  font-family: inherit;
}

.bib-btn-upload:hover { filter: brightness(0.9); }

.bib-info {
  font-size: 11px;
  opacity: 0.7;
  padding: 8px 12px;
  background: rgba(127, 127, 127, 0.08);
  border-left: 2px solid rgba(127, 127, 127, 0.3);
  margin-bottom: 14px;
}

.bib-info strong {
  color: inherit;
  opacity: 1;
}

.bib-lista {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bib-doc {
  background: rgba(127, 127, 127, 0.08);
  border: 1px solid rgba(127, 127, 127, 0.2);
  border-left: 3px solid var(--terracota, #C4714A);
  padding: 12px 14px;
  color: inherit;
}

.bib-doc-row1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  flex-wrap: wrap;
  gap: 8px;
}

.bib-doc-titulo {
  font-size: 13px;
  font-weight: bold;
  color: inherit;
}

.bib-doc-meta {
  font-size: 10px;
  opacity: 0.6;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.bib-doc-preview {
  font-size: 11px;
  opacity: 0.6;
  font-style: italic;
  margin: 6px 0 10px;
  line-height: 1.4;
}

.bib-doc-row2 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.bib-doc-modo {
  flex: 1;
  min-width: 200px;
  background: rgba(127, 127, 127, 0.08);
  color: inherit;
  border: 1px solid rgba(127, 127, 127, 0.3);
  padding: 6px 8px;
  font-size: 11px;
  border-radius: 0;
  color-scheme: light dark;
  font-family: inherit;
}

.bib-doc-modo:focus {
  border-color: var(--terracota, #C4714A);
  outline: none;
}

.bib-doc-del {
  background: transparent;
  border: 1px solid rgba(229, 90, 63, 0.5);
  color: #E55A3F;
  padding: 5px 12px;
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 0;
  font-family: inherit;
}

.bib-doc-del:hover {
  background: #B83B1F;
  color: #fff;
  border-color: #B83B1F;
}
