:root {
  --bg: #E3DFE3;
  --paper: #ffffff;
  --ink: #222222;
  --text: #222222;
  --wine: #8A234D;
  --rose: #C7416B;
  --blue: #243D8D;
  --violet: #63579D;
  --muted: #7E6A76;
  --line: rgba(34, 34, 34, .12);
  --grad: linear-gradient(100deg, var(--rose), var(--wine));
  --grad-spectrum: linear-gradient(90deg, var(--blue), var(--violet), var(--rose), var(--wine));
  --ok: #1F7A4D;
}

* { box-sizing: border-box; }

body {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  line-height: 1.55;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 34px;
  border-radius: 20px;
  box-shadow: 0 24px 60px -44px rgba(138, 35, 77, .4);
  width: 100%;
  max-width: 400px;
}
.card.wide {
  max-width: 780px;
}

.header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}
.header-text {
  flex: 1 1 auto;
  min-width: 0;
}
.brand-logo {
  flex: 0 0 auto;
  width: 170px;
  height: auto;
  margin-top: 4px;
}
@media (max-width: 560px) {
  .header-row {
    flex-direction: column;
  }
  .brand-logo {
    align-self: flex-end;
  }
}

.eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--wine);
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--grad-spectrum);
  border-radius: 2px;
}

h1 {
  margin-top: 0;
  font-family: 'Plus Jakarta Sans', 'Poppins', system-ui, sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--ink);
}
h1 em {
  font-style: italic;
  color: var(--rose);
}

p {
  color: var(--muted);
  font-size: 14px;
}

label {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--wine);
}

input, textarea, select {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  background: var(--paper);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(199, 65, 107, .15);
}
textarea {
  resize: vertical;
}
input[type="file"] {
  padding: 9px 12px;
  color: var(--muted);
  font-size: 13.5px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
}
.full {
  grid-column: 1 / -1;
}
.triple {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 20px;
}
.hidden {
  display: none !important;
}
.venc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0 16px;
}
.venc-grid:empty {
  display: none;
}
@media (max-width: 640px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .triple {
    grid-template-columns: 1fr;
  }
}

button {
  margin-top: 24px;
  width: 100%;
  padding: 13px;
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 100px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: .01em;
  text-shadow: 0 1px 2px rgba(74, 15, 40, .45);
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
}
button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -16px rgba(138, 35, 77, .55);
}

.login-logo {
  display: block;
  width: 150px;
  height: auto;
  margin: 0 0 22px;
}
.login-sub {
  margin: -4px 0 18px;
}
.forgot-link {
  display: block;
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.forgot-link:hover {
  color: var(--rose);
  text-decoration: underline;
}
.forgot-link.destaque {
  padding: 10px 16px;
  border: 1px solid var(--wine);
  border-radius: 100px;
  color: var(--wine);
  font-weight: 600;
  text-decoration: none;
}
.forgot-link.destaque:hover {
  background: rgba(138, 35, 77, .06);
  color: var(--wine);
  text-decoration: none;
}
.pw-wrap {
  position: relative;
}
.pw-wrap input {
  padding-right: 84px;
}
.pw-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: auto;
  margin: 0;
  padding: 5px 12px;
  background: transparent;
  color: var(--wine);
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  text-shadow: none;
}
.pw-toggle:hover {
  background: rgba(138, 35, 77, .06);
  transform: translateY(-50%);
  box-shadow: none;
}

.field-status {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}
.field-status.status-ok {
  color: var(--ok);
}
.field-status.status-erro {
  color: var(--wine);
}

.anexo-lista {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.anexo-lista:empty {
  display: none;
}
.anexo-lista li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px 6px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text);
}
.anexo-lista li span {
  overflow-wrap: anywhere;
}
.anexo-lista .btn-remove-row {
  flex: 0 0 auto;
}

.rateio-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-top: 6px;
}
.rateio-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 13px;
}
.rateio-table th,
.rateio-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.rateio-table th {
  background: rgba(138, 35, 77, .06);
  color: var(--wine);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.rateio-table input {
  width: 100%;
  min-width: 100px;
  padding: 6px 8px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
}
.rateio-percent {
  font-weight: 600;
  color: var(--wine);
  white-space: nowrap;
}
.rateio-table tfoot td {
  font-weight: 700;
  border-bottom: none;
  border-top: 1px solid var(--line);
  white-space: nowrap;
}
#rateioTotalRow.rateio-mismatch td {
  color: var(--wine);
}

.btn-add-row {
  margin-top: 10px;
  width: auto;
  padding: 8px 18px;
  background: transparent;
  color: var(--wine);
  border: 1px solid var(--wine);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  text-shadow: none;
}
.btn-add-row:hover {
  background: rgba(138, 35, 77, .06);
  transform: none;
  box-shadow: none;
}

.btn-remove-row {
  margin-top: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  text-shadow: none;
  cursor: pointer;
}
.btn-remove-row:hover {
  border-color: var(--wine);
  color: var(--wine);
  transform: none;
  box-shadow: none;
}

.msg {
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
}
.msg.erro {
  background: rgba(138, 35, 77, .08);
  color: var(--wine);
  border: 1px solid rgba(138, 35, 77, .3);
}
.msg.sucesso {
  background: rgba(31, 122, 77, .08);
  color: var(--ok);
  border: 1px solid rgba(31, 122, 77, .3);
}

.logout {
  display: inline-block;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}
.logout:hover {
  color: var(--rose);
}
