html,
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  margin: 0;
}

h2 {
  margin-top: 0px;
}

.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  background: #f9f9fb;
  overflow: hidden;
}

.header {
  height: 30px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  font-weight: 700;
}
.header-left {
  font-size: 36px;
}
.header-right {
  display: flex;
  gap: 8px;
}
.square-btn {
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
}
.square-btn img {
  display: block;
}

.footer {
  height: 0px;
  flex-shrink: 0;
  border-top: 2px solid #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.main-content {
  flex: 1;
  display: flex;
  overflow: hidden;
}

.left-panel {
  width: 450px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.right-panel {
  flex: 1;
  overflow: auto;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.card {
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
  padding: 15px;
  margin: 10px;
}

.data-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* container doesn't scroll; inner .data-list will */
}

/* Fixed top area inside the data panel: title and add form stay visible */
.data-fixed {
  flex: 0 0 auto;
  padding-bottom: 6px;
}

/* Scrollable list of added rows */
.data-list {
  flex: 1 1 auto;
  overflow-y: auto;
}

.data-list table {
  margin: 0;
}
.data-list thead th {
  position: sticky;
  top: 0;
  background: #e8f4ff;
  z-index: 2;
}
.paste-import {
  margin: 8px 10px;
}
.paste-import textarea {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px;
  font-family: monospace;
}
.paste-import .btn {
  background: #eee;
  border: 1px solid #ccc;
  .btn-blue {
    background: #2563eb;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
  }
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}
.paste-import .btn-add {
  margin-right: 6px;
}
.algorithms-panel {
  height: 240px;
  margin-bottom: 100px;
}
.run-panel {
  .data-actions .btn-blue {
    margin-right: 8px;
  }
  position: absolute;
  bottom: 10px;
  left: 0px;
  right: 0px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Algorithms table: two columns, label left, control right */
.alg-table {
  width: 100%;
  border-collapse: collapse;
}
.alg-table td {
  padding: 8px;
  vertical-align: middle;
}
.alg-table .alg-input {
  text-align: right;
}
.alg-table input.small-input {
  width: 80px;
}

.horizon-title {
  margin: 6px 0;
  font-size: 14px;
}
.horizon-control {
  display: flex;
  align-items: center;
  gap: 8px;
}
.horizon-control input[type="range"] {
  flex: 1;
}
.horizon-display {
  min-width: 72px;
  text-align: right;
  font-weight: 600;
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.small-input {
  width: 60px;
}

#chart {
  width: 100% !important;
  height: auto !important;
  display: block;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.35);
  z-index: 60;
}
.modal.hidden {
  display: none;
}
.modal-content {
  background: #fff;
  padding: 18px;
  width: 90%;
  max-width: 640px;
  border-radius: 8px;
}

/* Table styles inside data panel */
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
input[type="number"],
input[type="date"],
input[type="text"] {
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  width: 90%;
}
.btn-add {
  background: #10b981;
  color: white;
  padding: 6px 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.btn-forecast {
  background: #2563eb;
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  width: 100%;
  height: 40px;
}
