@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600&family=Source+Serif+4:wght@400;600&display=swap');

:root {
  --bg: #f8f5ef;
  --card: #ffffff;
  --ink: #251515;
  --muted: #665a55;
  --line: #e5ddd5;
  --accent: #7b0017;
  --accent-strong: #5d0011;
  --accent-soft: #f2e7e5;
  --leaf: #5d8a22;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #ffffff 0%, var(--bg) 58%, #ece4dc 100%);
  min-height: 100vh;
}

body.login-page {
  background: var(--accent);
}

header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 24px 32px 8px;
  text-align: center;
}

.brand {
  font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 128px;
  max-width: 100%;
  height: auto;
  display: block;
}

header .brand-logo {
  width: 96px;
}

.container {
  max-width: 1100px;
  margin: 0 auto 48px;
  padding: 0 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 24px;
  border-bottom: 2px solid var(--line);
}

.nav-tabs a {
  flex: 1 1 220px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 5px 5px 0 0;
  padding: 10px 16px;
  font-weight: 500;
  background: var(--accent-soft);
  text-align: center;
}

.nav-tabs a.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

form {
  display: grid;
  gap: 16px;
}

label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

input, select, textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 15px;
  width: 100%;
  min-width: 0;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 56px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-20%);
  height: 28px;
  min-width: 40px;
  padding: 0 8px;
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.password-toggle svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  stroke: none;
}

.password-toggle .icon-eye-off {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye {
  display: none;
}

.password-toggle[aria-pressed="true"] .icon-eye-off {
  display: inline-flex;
}

input[type="date"] {
  width: 100%;
  max-width: 100%;
  display: block;
}

button {
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.button-link {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.button-link.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.nav-actions {
  margin-bottom: 12px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 14px;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
}

.table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.notice {
  background: #fff8e6;
  border: 1px solid #f1e3b4;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #ffffff;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.badge-pix {
  background: var(--accent);
  color: #ffffff;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  box-shadow: none;
}

.pix-highlight {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.pix-copy-button {
  padding: 6px;
  border-radius: 999px;
  min-width: 32px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #5a5a5a;
  box-shadow: none;
}

.pix-copy-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pix-copy-button.is-copied {
  background: transparent;
  color: #2f7d32;
}

.extrato-head,
.pane-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #000000;
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.extrato-search {
  margin-bottom: 16px;
}

.extrato-search form {
  display: flex;
  gap: 12px;
  align-items: center;
}

.extrato-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid #000000;
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.summary-card {
  border: 1px solid #000000;
  border-radius: 5px;
  padding: 16px;
  text-align: center;
}

.summary-card strong {
  display: block;
  font-size: 22px;
  margin-top: 6px;
}

.summary-card--saldo {
  color: #ffffff;
  border-color: transparent;
}

.summary-card--saldo .small {
  color: #ffffff;
}

.summary-card--saldo.is-positive {
  background: var(--leaf);
  border-color: var(--leaf);
}

.summary-card--saldo.is-negative {
  background: #c0392b;
  border-color: #c0392b;
}

.valor-debito {
  color: #c0392b;
  font-weight: 600;
}

.valor-credito {
  color: #1e7f43;
  font-weight: 600;
}

.extrato-actions {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.login {
  max-width: 420px;
  margin: 80px auto;
}

.flex {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.small {
  font-size: 12px;
  color: var(--muted);
}

.header-meta {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px;
  background: #ffffff;
}

.header-meta a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

@media (max-width: 720px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .table thead {
    display: none;
  }

  .table,
  .table tbody,
  .table tr,
  .table td {
    display: block;
    width: 100%;
  }

  .table tr {
    border: 1px solid var(--line);
    border-radius: 5px;
    padding: 8px 12px;
    margin-bottom: 12px;
  }

  .table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: none;
    padding: 8px 4px;
  }

  .table td::before {
    content: attr(data-label);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    flex: 0 0 45%;
  }
}
