/* =========================================================
   ESEN AI — Loader + Skeleton + Fade System
   ========================================================= */
.gemini-render{
  position:relative;
}
.gx-loader{
  position:absolute;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(2,6,23,.72);
  backdrop-filter: blur(2px);
  border-radius:14px;
  z-index:5;
}
.gx-loader.on{ display:flex; }
.gx-box{
  width:100%;
  max-width:760px;
  border:1px solid #111827;
  background:#020617;
  border-radius:14px;
  padding:14px;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}
.gx-top{
  display:flex;
  gap:12px;
  align-items:center;
  margin-bottom:10px;
}
.gx-spinner{
  width:18px;
  height:18px;
  border-radius:999px;
  border:2px solid rgba(148,163,184,.25);
  border-top-color:#cbd5e1;
  animation: gxspin .9s linear infinite;
}
@keyframes gxspin{
  to{ transform:rotate(360deg); }
}
.gx-title{
  color:#f9fafb;
  font-weight:900;
  font-size:.98rem;
  margin:0;
}
.gx-step{
  color:#9ca3af;
  font-size:.9rem;
  margin-top:2px;
}
.gx-skel{
  display:grid;
  gap:8px;
  margin-top:10px;
}
.gx-row{
  height:14px;
  border-radius:10px;
  background: linear-gradient(
    90deg,
    rgba(148,163,184,.08),
    rgba(148,163,184,.18),
    rgba(148,163,184,.08)
  );
  background-size:220% 100%;
  animation: gxshimmer 1.15s ease-in-out infinite;
}
@keyframes gxshimmer{
  0%{ background-position:0% 0; }
  100%{ background-position:220% 0; }
}
.gx-fade{
  opacity:0;
  transform:translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
}
.gx-fade.on{
  opacity:1;
  transform:translateY(0);
}

/* =========================================================
   ESEN AI — Claude HTML Output Styles
   ========================================================= */
.esen-section {
  background: #ffffff;
  border: 0.5px solid rgba(0,0,0,0.12);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.esen-sec-title {
  font-size: 11px;
  font-weight: 500;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 0.5px solid rgba(0,0,0,0.1);
}
.esen-snap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 1rem;
}
.esen-snap-item {
  background: #f7f7f5;
  border: 0.5px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 10px 12px;
}
.esen-snap-label {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.esen-snap-val {
  font-size: 14px;
  font-weight: 500;
  color: #111;
}
.esen-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 12px;
}
.esen-table th {
  color: #888;
  font-weight: 500;
  text-align: left;
  padding: 6px 8px;
  border-bottom: 0.5px solid rgba(0,0,0,0.1);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.esen-table td {
  padding: 7px 8px;
  border-bottom: 0.5px solid rgba(0,0,0,0.07);
  color: #222;
  vertical-align: top;
}
.esen-table tr:last-child td { border-bottom: none; }
.esen-table tbody tr:hover td { background: #f9f9f7; }
.esen-badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 500;
  margin-left: 6px;
  vertical-align: middle;
}
.esen-badge-green  { background: #eaf3de; color: #27500a; }
.esen-badge-blue   { background: #e6f1fb; color: #0c447c; }
.esen-badge-amber  { background: #faeeda; color: #633806; }
.esen-badge-red    { background: #fcebeb; color: #791f1f; }
.esen-verdict {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
}
.esen-verdict.green  { background: #f0faf0; border: 0.5px solid #34a853; color: #1a5e2a; }
.esen-verdict.blue   { background: #e8f4ff; border: 0.5px solid #185fa5; color: #0c447c; }
.esen-verdict.amber  { background: #fef9ec; border: 0.5px solid #f9ab00; color: #7a4f00; }
.esen-verdict.red    { background: #fff0f0; border: 0.5px solid #ea4335; color: #7a1a1a; }
.esen-data-grid   { display: grid; grid-template-columns: 1fr 1fr;     gap: 10px; margin-bottom: 14px; }
.esen-data-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.esen-metric-label { font-size: 12px; color: #888; margin-bottom: 2px; }
.esen-metric-val   { font-size: 14px; font-weight: 500; color: #111; }
.esen-final-card {
  background: #0c447c;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  color: #b5d4f4;
}
.esen-final-card .esen-sec-title { color: #85b7eb; border-color: #185fa5; }
.esen-score-circle {
  width: 72px; height: 72px; border-radius: 50%;
  background: #e6f1fb;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.esen-score-num   { font-size: 26px; font-weight: 500; color: #0c447c; line-height: 1; }
.esen-score-label { font-size: 10px; color: #378add; text-transform: uppercase; }
.esen-score-row   { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.esen-final-title { color: #e6f1fb; font-size: 16px; font-weight: 500; margin-bottom: 6px; }
.esen-horizon-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.esen-horizon-item { padding: 10px 12px; border-radius: 8px; text-align: center; }
.esen-horizon-item.short  { background: #185fa5; border: 0.5px solid #378add; }
.esen-horizon-item.medium { background: #0f6e56; border: 0.5px solid #1d9e75; }
.esen-horizon-item.long   { background: #3c3489; border: 0.5px solid #534ab7; }
.esen-horizon-label { font-size: 11px; color: rgba(255,255,255,0.6); margin-bottom: 4px; }
.esen-horizon-val   { font-size: 13px; font-weight: 500; color: #fff; }
.esen-final-bullets { list-style: none; padding: 0; margin: 0; }
.esen-final-bullets li {
  color: #b5d4f4; font-size: 13px;
  padding: 5px 0 5px 14px;
  border-bottom: 0.5px solid #185fa5;
  position: relative; line-height: 1.6;
}
.esen-final-bullets li:last-child { border-bottom: none; }
.esen-final-bullets li::before { content: "▸"; position: absolute; left: 0; color: #378add; }
.esen-note { font-size: 12px; color: #aaa; margin-top: 8px; font-style: italic; line-height: 1.5; }
.esen-ticker-badge {
  display: inline-block; background: #185fa5; color: #e6f1fb;
  font-size: 18px; font-weight: 500; padding: 5px 14px;
  border-radius: 8px; margin-right: 10px; vertical-align: middle;
}
.esen-empty, .esen-error {
  padding: 1.5rem; border-radius: 8px;
  background: #fef9ec; border: 0.5px solid #f9ab00;
  color: #7a4f00; font-size: 13px; line-height: 1.6;
}
.esen-error { background: #fff0f0; border-color: #ea4335; color: #7a1a1a; }

/* =========================================================
   ESEN Radar Card
   ========================================================= */
.esen-radar-card {
  background: #1a1d27;
  border: 1px solid #2a2d3a;
  border-radius: 14px;
  padding: 20px 20px 16px;
  margin-bottom: 1rem;
}
.esen-radar-top {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 14px;
}
.esen-radar-svg-wrap { flex-shrink: 0; }
.esen-radar-pills {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 120px;
}
.esen-radar-pill {
  background: #12151f;
  border: 1px solid #2a2d3a;
  border-radius: 8px;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.esen-radar-pill-label {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex: 1;
}
.esen-radar-pill-val   { font-size: 16px; font-weight: 700; min-width: 32px; text-align: right; }
.esen-radar-pill-grade { font-size: 11px; font-weight: 600; min-width: 24px; text-align: right; }
.esen-radar-overall {
  background: #12151f;
  border: 1px solid #2a2d3a;
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.esen-radar-overall-label {
  font-size: 11px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}
.esen-radar-overall-grade { font-size: 15px; font-weight: 600; }
.esen-radar-big { font-size: 38px; font-weight: 700; line-height: 1; }

/* =========================================================
   ESEN AI — Dark Theme Override
   ========================================================= */
.esen-section {
  background: #0d1726 !important;
  border-color: rgba(255,255,255,.08) !important;
}
.esen-sec-title {
  color: #6b7280 !important;
  border-bottom-color: rgba(255,255,255,.07) !important;
}
.esen-snap-item {
  background: #0b1220 !important;
  border-color: rgba(255,255,255,.08) !important;
}
.esen-snap-label { color: #6b7280 !important; }
.esen-snap-val   { color: #f9fafb !important; }
.esen-table th {
  color: #6b7280 !important;
  border-bottom-color: rgba(255,255,255,.08) !important;
}
.esen-table td {
  color: #e5e7eb !important;
  border-bottom-color: rgba(255,255,255,.05) !important;
}
.esen-table tbody tr:hover td { background: rgba(255,255,255,.03) !important; }
.esen-badge-green  { background: #052e16 !important; color: #86efac !important; }
.esen-badge-blue   { background: #1e3a5f !important; color: #93c5fd !important; }
.esen-badge-amber  { background: #1c1200 !important; color: #fcd34d !important; }
.esen-badge-red    { background: #450a0a !important; color: #fca5a5 !important; }
.esen-verdict.green  { background: #052e16 !important; border-color: #166534 !important; color: #86efac !important; }
.esen-verdict.blue   { background: #1e3a5f !important; border-color: #1d4ed8 !important; color: #93c5fd !important; }
.esen-verdict.amber  { background: #1c1200 !important; border-color: #92400e !important; color: #fcd34d !important; }
.esen-verdict.red    { background: #450a0a !important; border-color: #991b1b !important; color: #fca5a5 !important; }
.esen-metric-label { color: #6b7280 !important; }
.esen-metric-val   { color: #f9fafb !important; }
.esen-final-card {
  background: #0c2a4a !important;
  border: 1px solid rgba(24,95,165,.35) !important;
}
.esen-final-card .esen-sec-title {
  color: #60a5fa !important;
  border-color: rgba(24,95,165,.35) !important;
}
.esen-score-circle {
  background: #1e3a5f !important;
  border: 1px solid rgba(55,138,221,.35) !important;
}
.esen-score-num   { color: #93c5fd !important; }
.esen-score-label { color: #60a5fa !important; }
.esen-final-title { color: #e6f1fb !important; }
.esen-horizon-item.short  { background: #1e3a5f !important; border-color: rgba(55,138,221,.4) !important; }
.esen-horizon-item.medium { background: #052e16 !important; border-color: rgba(29,158,117,.4) !important; }
.esen-horizon-item.long   { background: #1e1b4b !important; border-color: rgba(83,74,183,.4) !important; }
.esen-horizon-label { color: rgba(255,255,255,.55) !important; }
.esen-horizon-val   { color: #f9fafb !important; }
.esen-final-bullets li {
  color: #93c5fd !important;
  border-bottom-color: rgba(24,95,165,.25) !important;
}
.esen-final-bullets li::before { color: #60a5fa !important; }
.esen-note  { color: #6b7280 !important; }
.esen-empty { background: #1c1200 !important; border-color: #92400e !important; color: #fcd34d !important; }
.esen-error { background: #450a0a !important; border-color: #991b1b !important; color: #fca5a5 !important; }
.esen-ticker-badge {
  background: #1e3a5f !important;
  color: #93c5fd !important;
  border: 1px solid rgba(24,95,165,.4) !important;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 640px) {
  .esen-snap-grid    { grid-template-columns: 1fr 1fr; }
  .esen-data-grid    { grid-template-columns: 1fr; }
  .esen-data-grid-3  { grid-template-columns: 1fr 1fr; }
  .esen-horizon-grid { grid-template-columns: 1fr; }
  .esen-table { font-size: 12px; }
  .esen-table th, .esen-table td { padding: 5px 6px; }
  .esen-radar-top { flex-direction: column; }
  .esen-radar-pills { flex-direction: row; flex-wrap: wrap; }
  .esen-radar-pill  { min-width: 120px; flex: 1; }
}