/* static/style.css */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1b2436 0, #050814 55%, #02030a 100%);
  color: #f7f7ff;
  direction: rtl;
}

.app-shell {
  min-height: 100vh;
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 16px 24px;
  display: flex;
  flex-direction: column;
}

/* header */

.app-header {
  text-align: center;
  margin-bottom: 28px;
}

.app-header h1 {
  font-size: 32px;
  letter-spacing: 1px;
  color: #ffd15c;
  text-shadow: 0 0 18px rgba(255, 209, 92, 0.4);
}

.app-subtitle {
  margin-top: 10px;
  font-size: 14px;
  color: #c3c8e0;
}

/* search card */

.search-card {
  background: rgba(6, 10, 25, 0.95);
  border-radius: 18px;
  border: 1px solid rgba(126, 139, 185, 0.55);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.55);
  padding: 22px 22px 18px;
  margin-bottom: 24px;
}

.search-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-label {
  font-weight: 600;
  color: #f1f4ff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.search-label-hint {
  font-weight: 400;
  font-size: 12px;
  color: #9ca3c7;
}

.search-row {
  display: flex;
  gap: 10px;
}

.search-input {
  flex: 1;
  background: #050816;
  border-radius: 999px;
  border: 1px solid rgba(124, 131, 175, 0.8);
  padding: 10px 18px;
  font-size: 14px;
  color: #f7f7ff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.search-input::placeholder {
  color: #70789f;
}

.search-input:focus {
  border-color: #ffd15c;
  box-shadow: 0 0 0 1px rgba(255, 209, 92, 0.4);
  background: #050a18;
}

.btn-primary {
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff9f40, #ffcc58);
  color: #15141f;
  font-weight: 700;
  font-size: 14px;
  padding: 0 20px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 12px 25px rgba(255, 159, 64, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(255, 159, 64, 0.45);
  filter: brightness(1.05);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 10px 18px rgba(255, 159, 64, 0.3);
}

.search-helper {
  font-size: 12px;
  color: #9ca3c7;
}

/* alerts */

.alert {
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 18px;
}

.alert-error {
  background: rgba(185, 44, 70, 0.14);
  border: 1px solid rgba(255, 102, 132, 0.7);
  color: #ffc2cf;
}

/* summary */

.query-summary {
  margin-bottom: 18px;
  background: rgba(8, 13, 32, 0.9);
  border-radius: 14px;
  border: 1px solid rgba(126, 139, 185, 0.5);
  padding: 12px 16px;
}

.query-summary h2 {
  font-size: 15px;
  margin-bottom: 6px;
  color: #f7f7ff;
}

.query-summary p {
  font-size: 13px;
  color: #cbd1ec;
}

/* table */

.table-section {
  background: rgba(5, 9, 24, 0.95);
  border-radius: 18px;
  border: 1px solid rgba(118, 133, 192, 0.7);
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.7);
  padding: 18px 18px 14px;
  margin-bottom: 18px;
}

.table-wrapper {
  max-height: 420px;
  overflow: auto;
  border-radius: 12px;
}

/* scrollbars */

.table-wrapper::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: #050815;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: #313957;
  border-radius: 999px;
}

/* table element */

.etf-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 13px;
}

.etf-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}

.etf-table th {
  background: #12172a;
  color: #e5e8ff;
  padding: 8px 6px;
  text-align: right;
  border-bottom: 1px solid rgba(85, 97, 151, 0.7);
  font-weight: 600;
  white-space: nowrap;
}

.etf-table tbody tr:nth-child(odd) {
  background: rgba(6, 11, 30, 0.9);
}

.etf-table tbody tr:nth-child(even) {
  background: rgba(4, 8, 22, 0.9);
}

.etf-table td {
  padding: 7px 6px;
  border-bottom: 1px solid rgba(36, 46, 85, 0.6);
  color: #dde2ff;
  vertical-align: top;
}

.etf-table tbody tr:hover {
  background: radial-gradient(circle at top, rgba(33, 46, 88, 0.95), rgba(7, 10, 27, 0.98));
}

/* special cells */

.cell-ticker {
  font-weight: 700;
  color: #ffd15c;
  white-space: nowrap;
}

.cell-name {
  font-weight: 500;
}

.cell-risk {
  font-family: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.cell-yield,
.cell-expense {
  font-family: "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.cell-ai-comment,
.cell-bond-expl {
  font-size: 12px;
  line-height: 1.5;
  color: #c4c9eb;
}

/* no results */

.no-results {
  background: rgba(10, 13, 30, 0.9);
  border-radius: 14px;
  padding: 12px 16px;
  border: 1px dashed rgba(126, 139, 185, 0.6);
  text-align: center;
  color: #cbd1ec;
  font-size: 13px;
}

/* disclaimer */

.disclaimer {
  margin-top: 10px;
  font-size: 11px;
  color: #9da3c7;
}

/* footer */

.app-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(65, 76, 125, 0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #9da3c7;
}

.footer-left span,
.footer-right span {
  opacity: 0.9;
}

/* responsive */

@media (max-width: 768px) {
  .app-shell {
    padding: 20px 10px 16px;
  }

  .search-card {
    padding: 18px 14px 14px;
  }

  .search-row {
    flex-direction: column;
  }

  .btn-primary {
    width: 100%;
    padding: 10px 0;
  }

  .table-section {
    padding: 14px 10px 10px;
  }
}
