/* ══════════════════════════════════════
   FLORES DE BACH — Plugin CSS
══════════════════════════════════════ */

.bach-app {
  --cream: #f5f0e8;
  --warm: #faf8f4;
  --sage: #4a7050;
  --sage-light: #a8c5ab;
  --amber: #c8854a;
  --text: #2a2418;
  --text-mid: #5a5040;
  --text-light: #9a8f80;
  --border: #d8d0c0;
  --gold: #b89a50;
  --danger: #c0392b;
  --success-bg: #eaf3de;
  --success-txt: #3b6d11;
  --pending-bg: #faeeda;
  --pending-txt: #854f0b;
  font-family: 'Jost', sans-serif;
  color: var(--text);
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1rem 4rem;
}

.bach-screen { display: none; animation: bachFadeIn 0.3s ease; }
.bach-screen.active { display: block; }
@keyframes bachFadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

/* LOGIN */
.bach-login-wrap { max-width: 360px; margin: 3rem auto; }
.bach-logo-area { text-align: center; margin-bottom: 2rem; }
.bach-ornament { font-size: 18px; letter-spacing: 10px; opacity: 0.4; margin-bottom: 10px; }
.bach-logo-title { font-family: 'Cormorant Garamond', serif; font-size: 2rem; font-weight: 300; color: var(--text); }
.bach-logo-title em { font-style: italic; color: var(--sage); }
.bach-logo-sub { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-light); margin-top: 6px; }

/* CARDS */
.bach-card { background: var(--warm); border: 1px solid var(--border); border-radius: 4px; padding: 1.5rem; margin-bottom: 1rem; }

/* FIELDS */
.bach-field { margin-bottom: 1rem; }
.bach-field label { display: block; font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-light); margin-bottom: 6px; }
.bach-field input, .bach-field textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 4px; background: var(--cream); font-family: 'Jost', sans-serif; font-size: 0.9rem; color: var(--text); transition: border-color 0.2s; box-sizing: border-box; }
.bach-field input:focus, .bach-field textarea:focus { outline: none; border-color: var(--sage); }
.bach-field textarea { min-height: 90px; resize: vertical; }
.bach-field small { display: block; font-size: 0.75rem; color: var(--text-light); margin-top: 4px; font-style: italic; }

/* BUTTONS */
.bach-btn { display: inline-block; padding: 11px 20px; border-radius: 4px; font-family: 'Jost', sans-serif; font-size: 0.82rem; letter-spacing: 0.1em; cursor: pointer; transition: all 0.2s; border: none; text-align: center; }
.bach-btn-full { width: 100%; display: block; }
.bach-btn-sage { background: var(--sage); color: white; }
.bach-btn-sage:hover { opacity: 0.88; }
.bach-btn-amber { background: var(--amber); color: white; }
.bach-btn-amber:hover { opacity: 0.88; }
.bach-btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-mid); }
.bach-btn-outline:hover { border-color: var(--text-light); }
.bach-btn-sm { padding: 7px 14px; font-size: 0.78rem; }
.bach-btn-danger { background: transparent; border: 1px solid #e0b0aa; color: var(--danger); }
.bach-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.bach-btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.bach-loading-txt { font-size: 0.82rem; color: var(--text-light); display: none; }

.bach-err { font-size: 0.82rem; color: var(--danger); margin-top: 8px; display: none; }

/* HEADER */
.bach-dash-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 1rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.bach-dash-title { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 400; color: var(--text); }
.bach-dash-sub { font-size: 0.8rem; color: var(--text-light); }

/* TABS */
.bach-tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.bach-tab { padding: 10px 18px; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; background: none; border: none; cursor: pointer; color: var(--text-light); border-bottom: 2px solid transparent; margin-bottom: -1px; font-family: 'Jost', sans-serif; transition: all 0.2s; }
.bach-tab:hover { color: var(--text); }
.bach-tab.active { color: var(--sage); border-bottom-color: var(--sage); font-weight: 500; }

/* CONSULTANTE CARD */
.bach-consult-list { display: flex; flex-direction: column; gap: 8px; }
.bach-consult-card { background: var(--warm); border: 1px solid var(--border); border-radius: 4px; padding: 1rem 1.25rem; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: border-color 0.15s; }
.bach-consult-card:hover { border-color: var(--sage-light); }
.bach-avatar { width: 42px; height: 42px; border-radius: 50%; background: rgba(74,112,80,0.12); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 500; color: var(--sage); flex-shrink: 0; }
.bach-consult-info { flex: 1; min-width: 0; }
.bach-consult-name { font-size: 0.95rem; font-weight: 500; }
.bach-consult-meta { font-size: 0.8rem; color: var(--text-light); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bach-badge { font-size: 0.72rem; padding: 3px 10px; border-radius: 20px; font-weight: 500; white-space: nowrap; }
.bach-badge-pending { background: var(--pending-bg); color: var(--pending-txt); }
.bach-badge-done { background: var(--success-bg); color: var(--success-txt); }
.bach-empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-light); font-size: 0.88rem; line-height: 1.7; }

/* LABELS */
.bach-section-label { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-light); margin-bottom: 10px; font-weight: 500; }

/* INFO GRID */
.bach-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 1.25rem; }
@media (max-width: 480px) { .bach-info-grid { grid-template-columns: 1fr; } }
.bach-info-item { background: var(--cream); border: 1px solid var(--border); border-radius: 4px; padding: 10px 14px; }
.bach-info-item .bach-lbl { font-size: 0.7rem; color: var(--text-light); margin-bottom: 3px; letter-spacing: 0.1em; text-transform: uppercase; }
.bach-info-item .bach-val { font-size: 0.88rem; color: var(--text); line-height: 1.4; }

/* GRUPOS */
.bach-grupo-row { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 0.82rem; }
.bach-grupo-name { width: 190px; color: var(--text-mid); flex-shrink: 0; }
.bach-grupo-bar-wrap { flex: 1; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.bach-grupo-bar { height: 100%; background: var(--sage-light); border-radius: 3px; transition: width 0.6s ease; }
.bach-grupo-pts { font-size: 0.75rem; color: var(--text-light); min-width: 40px; text-align: right; }

/* CHIPS */
.bach-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1.25rem; }
.bach-chip { font-size: 0.78rem; padding: 4px 12px; border-radius: 20px; background: rgba(74,112,80,0.1); color: var(--sage); }

/* BACK */
.bach-back-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--text-light); background: none; border: none; cursor: pointer; margin-bottom: 1.5rem; padding: 0; font-family: 'Jost', sans-serif; }
.bach-back-btn:hover { color: var(--text); }

/* LINK BOX */
.bach-link-box { background: var(--cream); border: 1px solid var(--border); border-radius: 4px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.bach-link-box input { flex: 1; background: none; border: none; font-family: monospace; font-size: 0.78rem; color: var(--text-mid); outline: none; min-width: 0; }
.bach-copy-btn { font-size: 0.75rem; padding: 5px 12px; background: var(--sage); color: white; border: none; border-radius: 4px; cursor: pointer; white-space: nowrap; }

/* DIVIDER */
.bach-divider { width: 50px; height: 1px; background: linear-gradient(to right, transparent, var(--gold), transparent); margin: 2rem auto; }
.bach-section-divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* ══════════════════
   INFORME CONSULTANTE
══════════════════ */
.bach-informe-wrap { max-width: 640px; margin: 0 auto; padding: 1rem 1rem 4rem; }

.bach-informe-header { text-align: center; padding: 2.5rem 1rem 2rem; }
.bach-informe-ornament { font-size: 18px; letter-spacing: 10px; opacity: 0.35; margin-bottom: 14px; }
.bach-informe-title { font-family: 'Cormorant Garamond', serif; font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 300; line-height: 1.2; color: var(--text); }
.bach-informe-title em { font-style: italic; color: var(--sage); }
.bach-informe-date { font-size: 0.78rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-light); margin-top: 10px; }

.bach-informe-body { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; line-height: 1.9; color: var(--text-mid); margin-bottom: 2rem; white-space: pre-wrap; }

.bach-flor-block { background: var(--warm); border: 1px solid var(--border); border-radius: 4px; padding: 1.25rem; margin-bottom: 1rem; }
.bach-flor-nombre { font-family: 'Cormorant Garamond', serif; font-size: 1.2rem; font-weight: 600; color: var(--text); margin-bottom: 12px; }
.bach-flor-aspecto { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 600; margin-bottom: 6px; }
.bach-flor-neg { color: var(--amber); }
.bach-flor-pos { color: var(--sage); }
.bach-flor-txt { font-family: 'Cormorant Garamond', serif; font-size: 1.02rem; line-height: 1.8; color: var(--text-mid); margin-bottom: 10px; }
.bach-flor-txt:last-child { margin-bottom: 0; }

.bach-msg-personal { background: rgba(74,112,80,0.05); border-left: 3px solid var(--sage-light); padding: 1.25rem 1.5rem; font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; line-height: 1.9; color: var(--text-mid); white-space: pre-wrap; margin: 2rem 0; }

.bach-private-notice { text-align: center; font-size: 0.75rem; color: var(--text-light); margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--border); line-height: 1.6; }

.bach-loading { text-align: center; padding: 3rem; color: var(--text-light); font-size: 0.9rem; }
.bach-not-found { text-align: center; padding: 4rem 1rem; color: var(--text-light); font-size: 0.88rem; line-height: 1.7; }
