* {
  color: var(--text);
  margin: 0;
  font-family: sans-serif;
  box-sizing: border-box;
  padding: 0;
}

:root {
  --chart-1: #fbbf24;
  --card: #f9fafb;
  --card-foreground: hsl(222.2 47.4% 11.2%);
  font-size: 12px;
  --tooltip-bg: rgba(0, 0, 0, 0.85);
  --chart-succeeded: #ffde26;
  --chart-failed: #ffb326;
  --tooltip-fg: white;
  --line: #d1d5db;
  --text: #111827;
  --text-muted: #6b7280;
  --body-bg: #e5e7eb;
  --card-border-color: #e5e7eb;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.dark {
  --card: #171717;
  --card-foreground: hsl(210 40% 98%);

  --tooltip-bg: rgba(255, 255, 255, 0.85);
  --tooltip-fg: black;
  --line: #1d1d1d;
  --text: white;
  --text-muted: lightgray;
  --body-bg: black;
  --card-border-color: #2c2c2c90;
}

body {
  background-color: var(--body-bg);
}

.card {
  background: var(--card);
  color: var(--card-foreground);
  min-width: calc(80svw / 4 - 90px);
  max-width: calc(80svw / 3 - 30px);
  display: flex;
  flex-direction: column;
  gap: 30px;
  justify-content: space-between;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--card-border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  font-family: Arial, sans-serif;
}

.tooltip {
  position: fixed;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 6px;
  background: var(--tooltip-bg);
  color: var(--tooltip-fg);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -100%);
  transition: opacity 0.12s ease-out;
  white-space: nowrap;
  z-index: 10;
}

.graphList {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 30px;
  max-width: 80svw;
  margin: auto;
}

.graphList > .card {
  flex-grow: 1;
}
.card svg {
  max-height: 300px;
}

.graph .axis-label {
  fill: var(--text-muted) !important;
}
.graph text {
  fill: var(--text) !important;
}
.graph line {
  stroke: var(--line) !important;
}
.graph .line {
  stroke: var(--chart-1) !important;
}
.graph .bar.positive {
  fill: var(--chart-succeeded) !important;
}
.graph .bar.negative {
  fill: var(--chart-failed) !important;
}

header {
  display: flex;
  width: 100%;
  padding: 12px 10svw;
  align-items: center;
  justify-content: space-between;
  border-bottom: solid 1px var(--line);
}

main {
  padding-block: 30px;
}

.logo img {
  height: 30px;
}

img {
  display: block;
  height: inherit;
  width: inherit;
}

ul {
  list-style: none;
}

button {
  background-color: var(--card-border-color);
  padding: 6px 8px;
  border-radius: 6px;
  border: solid 1px var(--card-border-color);
  outline: none;
  transition: background-color 0.2s ease-in-out;
  color: var(--text);
}

button:hover {
  background-color: var(--line);
}

nav ul {
  display: flex;
  gap: 6px;
}

.navItem {
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.2s ease-in-out;
}

.navItem:hover {
  background-color: var(--card-border-color);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.leftSide {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
}

.metricCard {
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  max-width: calc(80svw / 4 - 30px) !important;
}

.cardTop {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.metricCard .metric {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  background: var(--card-border-color);
  padding: 8px 12px;
  border-radius: 8px;
  line-height: 1;
}

.cardLeft {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}
.cardHeader {
  font-size: 1rem;
}
.cardIcon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffb326;
  color: black;
}
.cardIcon svg {
  color: black;
  stroke: black;
}

.loginContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--body-bg);
}

.formContainer {
  background: var(--card);
  color: var(--card-foreground);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid var(--card-border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.formHeader {
  text-align: center;
}

.formHeader h3 {
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--text);
}

.formHeader p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.formBody {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.inputContainer {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inputContainer label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
}

.inputContainer input {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--card-border-color);
  background-color: var(--body-bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.inputContainer input::placeholder {
  color: var(--text-muted);
}

.dark .inputContainer input {
  background-color: #080a0c;
  border-color: #21262f;
}

.inputContainer input:focus {
  border-color: var(--chart-1);
}

.inputContainer button {
  background-color: var(--chart-1);
  color: black;
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.2s;
}

.inputContainer button:hover {
  opacity: 0.9;
  background-color: var(--chart-failed);
}

.avatar {
  height: 50px;
  width: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.theme-toggle-container {
  position: absolute;
  top: 20px;
  right: 20px;
}

.theme-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: background-color 0.2s;
}

.theme-btn:hover {
  background-color: var(--card-border-color);
}

.table-container {
    overflow-x: auto;
    height: 100%;
  }

  table.data-table {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    border-collapse: collapse;
    min-width: 300px;
  }

table.data-table th,
table.data-table td {
  padding: 14px 18px;
  text-align: left;
}

table.data-table th {
  background: var(--card);
  font-weight: bold;
  color: var(--card-foreground);
}

table.data-table tbody tr {
  border-top: 1px solid var(--card-border-color);
}

table.data-table tbody tr:hover {
  background-color: var(--card-border-color);
}

td.amount {
  text-align: right;
  font-weight: 500;
}

.action-btn {
  padding: 4px 8px;
  background-color: var(--card-border-color);
  border: none;
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
}

.action-btn:hover {
  background-color: var(--line);
}

@media (max-width: 640px) {
  .graphList > .card {
    flex-grow: 0;
  }

  .card {
    width: 80vw;
    min-width: 80vw;
    max-width: 80vw;
  }
}

@media (min-width: 641px) and (max-width: 1280px) {
  .card {
    min-width: calc(80vw / 2 - 30px);
    max-width: 80vw;
    width: unset;
  }
  .metricCard {
    min-width: calc(80vw / 2 - 30px) !important;
    max-width: 80vw !important;
  }
}

@media (min-width: 1281px) {
  .card {
    min-width: calc(80vw / 4 - 90px);
    max-width: calc(80vw / 3 - 30px);
    width: unset;
  }
}
