:root {
  --bg: #0b3a8d;
  --card: #ffffff;
  --text: #0b1b3a;
  --muted: #4a5b7a;
  --primary: #2c68ff;
  --primary-hover: #2558db;
  --border: #d9e2f2;
  --field: #eaf1ff;
  --danger: #d92d20;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: Calibri, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.card {
  width: 100%;
  max-width: 520px;
  background: var(--card);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  padding: 28px;
}

.card-login {
  max-width: 416px;
}

.card-wide {
  max-width: 1100px;
}

.h1 {
  margin: 0;
  font-size: 24px;
  text-align: center;
}

.subtitle {
  margin: 8px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.form {
  margin-top: 18px;
}

.field {
  margin-top: 16px;
}

.label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 12px 12px;
  background: var(--field);
  outline: none;
  font-size: 14px;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44, 104, 255, 0.15);
}

.actions {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  padding: 0 14px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

.btn-danger {
  background: #fff;
  border-color: rgba(217, 45, 32, 0.35);
  color: var(--danger);
}

.alert {
  margin-top: 16px;
  padding: 12px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.alert-error {
  background: rgba(217, 45, 32, 0.08);
  border: 1px solid rgba(217, 45, 32, 0.25);
  color: #7a271a;
}

.alert-success {
  background: rgba(2, 122, 72, 0.08);
  border: 1px solid rgba(2, 122, 72, 0.25);
  color: #054f31;
}

.shell {
  min-height: 100vh;
  padding: 26px 16px 40px;
}

.logo-wrap {
  display: flex;
  justify-content: center;
  margin: 4px 0 18px;
}

.app-logo {
  width: min(84px, 20vw);
  height: auto;
  display: block;
}

.topbar {
  max-width: 1452px;
  margin: 0 auto 14px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-title {
  font-weight: 700;
}

.topbar-actions {
  display: flex;
  gap: 14px;
  align-items: center;
}

.topbar-actions .link {
  padding: 8px 10px;
  border-radius: 8px;
  color: #1b3ea6;
  background: transparent;
  border: 1px solid transparent;
}

.topbar-actions .link:hover {
  background: rgba(44, 104, 255, 0.08);
  border-color: rgba(44, 104, 255, 0.20);
  text-decoration: none;
}

.topbar-actions .link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(44, 104, 255, 0.20);
}

.main {
  max-width: 1452px;
  margin: 0 auto;
}

.panel {
  background: #fff;
  border-radius: 10px;
  padding: 18px;
  border: 1px solid var(--border);
}

.panel-cadastro {
  padding: 16px;
}

.panel-cadastro .form {
  margin-top: 16px;
}

.table-wrap {
  margin-top: 12px;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  color: var(--text);
}

.table-compact {
  font-size: 12px;
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  white-space: nowrap;
}

.vendors-table th,
.vendors-table td {
  padding: 6px 8px;
}

.table-compact th,
.table-compact td {
  padding: 5px 9px;
}

.table th {
  font-weight: 700;
  color: #233a6d;
  background: rgba(44, 104, 255, 0.06);
  text-align: center;
}

.table thead tr th:first-child {
  border-top-left-radius: 10px;
}

.table thead tr th:last-child {
  border-top-right-radius: 10px;
}

.table tbody tr:nth-child(even) td {
  background: rgba(243, 247, 255, 0.55);
}

.table tbody tr:hover td {
  background: rgba(44, 104, 255, 0.06);
}

.betina-commission th,
.betina-commission td {
  text-align: left;
}

.table-group-betina td {
  background: rgba(44, 104, 255, 0.10);
  border-bottom: 1px solid rgba(44, 104, 255, 0.22);
}

.table-group-rossi td {
  background: rgba(82, 42, 150, 0.14);
  border-bottom: 1px solid rgba(82, 42, 150, 0.26);
}

.table tbody tr.vendor-betina td {
  background: rgba(44, 104, 255, 0.06);
}

.table tbody tr.vendor-rossi td {
  background: rgba(82, 42, 150, 0.14);
}

.table tbody tr.vendor-betina:hover td {
  background: rgba(44, 104, 255, 0.10);
}

.table tbody tr.vendor-rossi:hover td {
  background: rgba(82, 42, 150, 0.18);
}

.table-group td {
  color: #17326f;
  font-weight: 700;
  font-size: 1.1em;
  border-bottom: 1px solid rgba(11, 58, 141, 0.16);
}

.t-right {
  text-align: right;
}

.t-center {
  text-align: center;
}

.input[readonly] {
  background: rgba(243, 247, 255, 0.65);
}

.month-filter {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(243, 247, 255, 0.70);
  border: 1px solid rgba(217, 226, 242, 0.90);
}

.vendors-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.vendors-header-left {
  width: 100%;
}

.month-input {
  width: 170px;
  text-align: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(44, 104, 255, 0.35);
  border-radius: 12px;
  padding: 10px 12px;
  height: 40px;
  font-weight: 700;
  letter-spacing: 0.2px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.month-input:focus {
  border-color: rgba(44, 104, 255, 0.95);
  box-shadow: 0 0 0 4px rgba(44, 104, 255, 0.16), 0 1px 2px rgba(16, 24, 40, 0.06);
}

.month-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.month-label {
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0;
  flex: 1;
  text-align: center;
}

.month-badge {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(44, 104, 255, 0.12);
  border: 1px solid rgba(44, 104, 255, 0.22);
  color: #1b3ea6;
  font-weight: 700;
}

.input-compact {
  padding: 8px 10px;
  font-size: 13px;
  height: 36px;
}

.vendors-table .input-compact {
  padding: 6px 6px;
  height: 34px;
}

.vendors-table input.js-money-vale {
  background: rgba(217, 45, 32, 0.08);
  border-color: rgba(217, 45, 32, 0.25);
}

.row {
  display: grid;
  gap: 10px;
}

@media (min-width: 900px) {
  .row.cols-4 {
    grid-template-columns: 1.2fr 1.4fr 1fr 160px;
    align-items: end;
  }

  .row.cols-3 {
    grid-template-columns: 1.4fr 1.4fr 160px;
    align-items: end;
  }

  .row.cols-5 {
    grid-template-columns: 0.6fr 1.2fr 1.2fr 0.9fr 160px;
    align-items: end;
  }
}

.list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.list-item {
  background: #f3f7ff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.vales-list .list-item {
  padding-top: 12.6px;
  padding-bottom: 12.6px;
}

.vale-quitado {
  background: rgba(2, 122, 72, 0.10);
  border-color: rgba(2, 122, 72, 0.25);
}

.vale-pendente {
  background: rgba(217, 45, 32, 0.08);
  border-color: rgba(217, 45, 32, 0.25);
}

.item-title {
  font-weight: 700;
}

.item-sub {
  color: var(--muted);
  font-size: 13px;
}

.item-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.small {
  height: 34px;
  border-radius: 9px;
  padding: 0 12px;
  font-size: 13px;
}

.link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.link:hover {
  text-decoration: underline;
}
