/* ============================================================
   EXPERTXLS — spreadsheet workbook visual
   ============================================================ */
.xls {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(10, 37, 64, 0.04),
    0 24px 48px -28px rgba(10, 37, 64, 0.25);
}
.xls-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg-elev-2) 100%);
  border-bottom: 1px solid var(--border);
}
.xls-dots {
  display: flex;
  gap: 4px;
}
.xls-dots i {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #cbd5e1;
}
.xls-dots i:nth-child(1) { background: #f59e0b; opacity: 0.7; }
.xls-dots i:nth-child(2) { background: #fbbf24; opacity: 0.7; }
.xls-dots i:nth-child(3) { background: #4ade80; opacity: 0.7; }
.xls-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  flex: 1;
  text-align: center;
}
.xls-ext {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.xls-formula {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
}
.xls-cellref {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 8px;
  color: var(--text);
  font-weight: 600;
  min-width: 38px;
  text-align: center;
}
.xls-fx {
  color: var(--text-mute);
  font-style: italic;
}
.xls-form-input {
  flex: 1;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 8px;
  color: var(--text);
}
.xls-form-input .kw { color: var(--accent); font-weight: 600; }
.xls-form-input .ref { color: #b45309; }
.xls-grid {
  background: var(--bg-elev);
  display: grid;
  grid-template-columns: 36px repeat(5, 1fr);
  font-family: var(--font-mono);
  font-size: 11px;
}
.xls-cell {
  padding: 7px 8px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.xls-cell.head {
  background: var(--bg-inset);
  color: var(--text-mute);
  font-weight: 600;
  text-align: center;
  padding: 6px 8px;
}
.xls-cell.row {
  background: var(--bg-inset);
  color: var(--text-mute);
  font-weight: 600;
  text-align: center;
  padding: 6px 8px;
}
.xls-cell.num { text-align: right; color: var(--text); }
.xls-cell.curr { text-align: right; color: var(--success); font-weight: 600; }
.xls-cell.formula { text-align: right; color: var(--accent); font-weight: 700; background: var(--accent-soft); }
.xls-cell.bold-row { font-weight: 700; }
.xls-cell.chart-cell {
  grid-column: span 5;
  padding: 10px 12px;
  display: flex;
  align-items: end;
  gap: 6px;
  height: 64px;
}
.xls-bar-b {
  flex: 1;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-deep) 100%);
  border-radius: 2px 2px 0 0;
  opacity: 0.85;
}
.xls-bar-b:nth-child(1) { height: 42%; }
.xls-bar-b:nth-child(2) { height: 68%; }
.xls-bar-b:nth-child(3) { height: 56%; }
.xls-bar-b:nth-child(4) { height: 82%; }
.xls-bar-b:nth-child(5) { height: 74%; }
.xls-bar-b:nth-child(6) { height: 94%; }
.xls-tabs {
  display: flex;
  background: var(--bg-elev-2);
  border-top: 1px solid var(--border);
  padding: 0 8px;
  gap: 0;
}
.xls-tab {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 7px 14px;
  color: var(--text-mute);
  border-right: 1px solid var(--border);
  background: var(--bg-elev-2);
}
.xls-tab.active {
  background: var(--bg-elev);
  color: var(--accent);
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
  margin-bottom: -1px;
}
.xls-tab-plus {
  padding: 7px 10px;
  color: var(--text-mute);
  margin-left: auto;
}

@media (max-width: 1000px) {
  .xls { max-width: 420px; }
  .xls-cell { padding: 6px 6px; font-size: 10.5px; }
  .xls-cell.chart-cell { height: 50px; }
}
@media (max-width: 760px) {
  .xls { max-width: 360px; }
  .xls-grid { grid-template-columns: 28px repeat(5, 1fr); }
  .xls-cell { padding: 5px 4px; font-size: 9.5px; }
  .xls-formula { font-size: 10px; }
}
