:root {
  color-scheme: light;
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-muted: #ecfdf5;
  --text: #374151;
  --heading: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #047857;
  --primary-dark: #064e3b;
  --primary-soft: #d1fae5;
  --footer: #111827;
  --danger: #991b1b;
  --warning: #92400e;
  --success: #047857;
  --container: 56rem;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  font-family: "Nunito Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-family: inherit;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

a {
  color: inherit;
}

.site-header {
  border-top: 2px solid var(--heading);
  border-bottom: 2px solid var(--primary);
  background: var(--bg);
  box-shadow: none;
}

.site-header__top {
  width: min(100%, 1280px);
  min-height: 96px;
  margin: 0 auto;
  padding: 16px 48px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 28px;
}

.quick-contact {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #1f2937;
}

.quick-contact__icon {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  color: #344051;
}

.quick-contact__text {
  display: grid;
  gap: 2px;
  font-size: 0.925rem;
  line-height: 1.25;
}

.quick-contact__text strong {
  color: var(--heading);
  font-size: 0.925rem;
  font-weight: 500;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--heading);
  font-weight: 800;
  text-decoration: none;
}

.brand__logo {
  width: auto;
  height: 46px;
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.user-badge {
  min-width: 153px;
  min-height: 44px;
  border-radius: 4px;
  padding: 8px 16px;
  background: var(--primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
}

.header-logout {
  min-width: 70px;
  min-height: 44px;
  border-color: #344051;
  border-radius: 8px;
  background: #344051;
  color: #ffffff;
  padding-inline: 14px;
}

.header-logout:hover {
  border-color: #202938;
  background: #202938;
  color: #ffffff;
}

.site-header__nav {
  background: var(--primary);
}

.site-header__nav-inner {
  width: min(100%, var(--container));
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav-link {
  border-radius: 4px;
  padding: 6px 12px;
  color: #ffffff;
  font-size: 0.925rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-link:hover {
  background: var(--primary-dark);
  color: #ffffff;
}

.shell {
  margin: 0 auto;
  padding: 32px 24px;
}

.button {
  min-height: 42px;
  border: 1px solid var(--primary);
  border-radius: 4px;
  padding: 9px 14px;
  background: var(--primary);
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.025em;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.button:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #ffffff;
}

.button:disabled {
  opacity: 0.65;
  cursor: progress;
}

.button--secondary {
  background: var(--surface);
  color: var(--primary);
}

.button--secondary:hover {
  background: var(--primary);
  color: #ffffff;
}

.button--ghost {
  border-color: #374151;
  background: #374151;
  color: #f3f4f6;
}

.button--ghost:hover {
  border-color: #1f2937;
  background: #1f2937;
  color: #ffffff;
}

.page-title {
  margin: 0 0 8px;
  color: var(--heading);
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 800;
  line-height: 1.15;
}

.page-subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.action,
.content-panel,
.login-panel,
.request-card {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.action {
  min-height: 148px;
  border-radius: 4px 16px 16px 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.action__title {
  margin: 0;
  color: var(--heading);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0.025em;
}

.action__body {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.login-panel {
  width: min(100%, 430px);
  margin: 32px auto 0;
  border-radius: 4px 16px 16px 16px;
  padding: 26px;
}

.login-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.login-brand img {
  height: 62px;
  width: auto;
}

.content-panel {
  width: min(100%, 720px);
  border-radius: 4px 16px 16px 16px;
  padding: 26px;
}

.content-panel--wide {
  width: min(100%, 1080px);
}

.form-field {
  display: grid;
  gap: 6px;
  margin-top: 16px;
}

.form-field--checkbox label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-weight: 700;
}

.form-field--checkbox input {
  width: auto;
  min-height: auto;
  margin-top: 5px;
}

.guidance-summary {
  margin-top: 22px;
  color: var(--text);
}

.guidance-document {
  line-height: 1.65;
}

.guidance-section {
  margin-top: 28px;
}

.guidance-section h2,
.guidance-qa h3 {
  margin: 0 0 10px;
  color: var(--heading);
  line-height: 1.25;
}

.guidance-section h2 {
  font-size: 1.28rem;
}

.guidance-qa {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.guidance-qa h3 {
  font-size: 1.02rem;
}

.guidance-list,
.guidance-document ul {
  padding-left: 24px;
}

.guidance-list li,
.guidance-document li {
  margin-top: 8px;
}

label {
  color: var(--heading);
  font-weight: 800;
}

input,
textarea,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px 12px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(4, 120, 87, 0.22);
  border-color: var(--primary);
}

input[disabled] {
  background: var(--surface-muted);
  color: var(--muted);
}

.helptext {
  color: var(--muted);
  font-size: 0.9rem;
}

.errorlist,
.form-error {
  color: var(--danger);
  font-size: 0.92rem;
}

.errorlist {
  margin: 6px 0 0;
  padding-left: 18px;
}

.messages {
  display: grid;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.message {
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 4px;
  padding: 10px 12px;
  background: var(--surface);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.filter-actions {
  align-self: end;
}

.selected-attachments {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.selected-attachments[hidden] {
  display: none;
}

.selected-attachment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-muted);
}

.selected-attachment__name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--heading);
  font-size: 0.9rem;
  font-weight: 700;
}

.selected-attachment__remove {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.82rem;
}

.reimbursement-sheet {
  margin-top: 22px;
  border: 1px solid #111827;
  background: #ffffff;
  color: #111827;
  font-family: Arial, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.86rem;
  overflow-x: auto;
}

.sheet-header {
  min-width: 900px;
  display: grid;
  grid-template-columns: 240px 1fr 320px;
  border-bottom: 1px solid #111827;
}

.sheet-logo,
.sheet-title,
.sheet-meta {
  min-height: 112px;
  border-right: 1px solid #111827;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12px;
}

.sheet-logo {
  color: var(--primary);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.sheet-title {
  font-weight: 800;
}

.sheet-meta {
  border-right: 0;
  gap: 0;
  padding: 0;
  background: #ffff00;
}

.sheet-meta span,
.sheet-meta strong {
  width: 100%;
  min-height: 22px;
  border-bottom: 1px solid #111827;
  display: grid;
  place-items: center;
  padding: 3px 8px;
  line-height: 1.2;
}

.sheet-meta span:last-child {
  border-bottom: 0;
}

.sheet-row,
.sheet-grid,
.expense-table,
.sheet-signatures {
  min-width: 900px;
}

.sheet-row--period {
  display: grid;
  grid-template-columns: 90px 270px 190px 1fr;
  border-bottom: 1px solid #111827;
}

.sheet-cell {
  min-height: 72px;
  border-right: 1px solid #111827;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.sheet-cell:last-child {
  border-right: 0;
}

.sheet-label {
  justify-content: end;
  font-weight: 800;
}

.sheet-options ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sheet-options label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 700;
}

.sheet-options input {
  width: auto;
  min-height: auto;
}

.sheet-dates {
  grid-template-columns: 1fr 1fr;
  align-items: end;
}

.sheet-dates>span {
  grid-column: 1 / -1;
  font-weight: 800;
}

.sheet-section-title {
  min-width: 900px;
  min-height: 34px;
  border-bottom: 1px solid #111827;
  display: grid;
  place-items: center;
  font-weight: 800;
  text-align: center;
}

.sheet-grid--two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid #111827;
}

.sheet-field {
  min-height: 68px;
  border-right: 1px solid #111827;
  border-bottom: 1px solid #111827;
  padding: 10px;
  display: grid;
  gap: 5px;
  align-content: center;
}

.sheet-field:nth-child(2n) {
  border-right: 0;
}

.sheet-field--city {
  grid-template-columns: 1fr 84px;
  align-items: end;
}

.sheet-grid--notes .sheet-field {
  min-height: 118px;
  align-content: start;
}

.expense-table {
  display: grid;
  grid-template-columns: 168px minmax(180px, 1.5fr) 72px minmax(180px, 1.4fr) 170px 132px;
  border-bottom: 1px solid #111827;
}

.expense-row {
  display: contents;
}

.expense-row--removed .expense-cell {
  display: none;
}

.expense-head,
.expense-cell,
.expense-total-label,
.expense-total-value {
  border-right: 1px solid #111827;
  border-bottom: 1px solid #111827;
  padding: 9px;
}

.expense-head {
  min-height: 54px;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 800;
}

.expense-cell {
  min-height: 68px;
  display: grid;
  align-content: center;
}

.expense-date input {
  min-width: 136px;
  padding-left: 9px;
  padding-right: 8px;
}

.expense-action {
  border-right: 0;
}

.expense-action input[type="checkbox"] {
  display: none;
}

.expense-action {
  gap: 8px;
}

.expense-remove {
  width: 100%;
  min-height: 36px;
  padding: 7px 8px;
  font-size: 0.82rem;
}

.expense-remove[hidden] {
  display: none;
}

.expense-add-inline {
  width: 100%;
  min-height: 36px;
  padding: 7px 8px;
  font-size: 0.82rem;
}

.expense-total-label {
  grid-column: 1 / 5;
  display: grid;
  place-items: center;
  font-weight: 800;
}

.expense-total-value {
  display: grid;
  place-items: center;
  font-weight: 800;
}

.sheet-signatures {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 44px 48px 16px;
}

.sheet-signatures span {
  border-top: 1px solid #111827;
  padding-top: 8px;
  text-align: center;
  font-weight: 700;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 4px 16px 16px 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

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

.request-card {
  border-radius: 4px 16px 16px 16px;
  padding: 18px;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.request-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.request-card__title {
  margin: 0;
  color: var(--heading);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.025em;
  overflow-wrap: anywhere;
}

.request-meta,
.detail-grid,
.attachment-list {
  display: grid;
  gap: 8px;
}

.attachment-item,
.expense-item {
  overflow-wrap: anywhere;
}

.request-meta {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 22px;
}

.data-item {
  min-width: 0;
}

.data-label {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.data-value {
  display: block;
  overflow-wrap: anywhere;
  color: var(--heading);
  font-weight: 800;
  line-height: 1.35;
}

.status-pill {
  border: 1px solid #a7f3d0;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.text-block {
  margin-top: 22px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.text-block strong {
  display: block;
  margin-bottom: 6px;
  color: var(--heading);
  font-weight: 800;
}

.site-footer {
  margin-top: 32px;
  background: var(--footer);
  color: #ffffff;
}

.site-footer__main {
  width: min(100%, 896px);
  margin: 0 auto;
  padding: 36px 24px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 70px;
}

.site-footer__contact {
  display: grid;
  gap: 6px;
}

.site-footer__contact h2 {
  margin: 0 0 2px;
  color: #ffffff;
  font-size: 1.25rem;
  line-height: 1.25;
}

.site-footer__contact p {
  margin: 0;
  color: #ffffff;
  font-size: 0.925rem;
  line-height: 1.6;
  display: flex;
  align-items: center;
  gap: 14px;
}

.site-footer__contact-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: #ffffff;
}

.site-footer a {
  color: #00c894;
  font-weight: 700;
  text-decoration: none;
}

.site-footer a:hover {
  color: #10b981;
}

.site-footer__links {
  display: grid;
  align-content: start;
  gap: 18px;
}

.site-footer__nav {
  display: flex;
  gap: 44px;
  align-items: center;
  flex-wrap: nowrap;
}

.site-footer__nav a {
  color: #00c894;
  font-family: inherit;
  font-size: 0.925rem;
  font-weight: 700;
}

.site-footer__social {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-footer__social a {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  background: var(--primary);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
}

.site-footer__social-icon {
  width: 24px;
  height: 24px;
  display: block;
}

.site-footer__social a:hover {
  background: var(--primary-dark);
  color: #ffffff;
}

.site-footer__bottom {
  background: #3b4656;
  color: #ffffff;
}

.site-footer__bottom div {
  width: min(100%, 896px);
  margin: 0 auto;
  padding: 10px 24px;
  font-size: 0.8rem;
}

@media (max-width: 720px) {
  .site-header__top {
    min-height: auto;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 14px 18px;
  }

  .brand__logo {
    height: 44px;
  }

  .quick-contact,
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .quick-contact {
    justify-content: center;
  }

  .user-badge {
    max-width: min(100%, 260px);
    flex: 1;
  }

  .header-actions .button {
    width: auto;
  }

  .site-header__nav-inner {
    justify-content: flex-start;
    overflow-x: auto;
    padding: 8px 18px;
  }

  .shell {
    padding: 30px 18px;
  }

  .actions,
  .filter-grid,
  .request-meta,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .request-card__header {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .login-panel,
  .content-panel,
  .filter-grid,
  .request-card {
    padding: 18px;
  }

  .form-actions {
    flex-direction: column;
  }

  .filter-actions {
    align-self: stretch;
  }

  .selected-attachment {
    grid-template-columns: 1fr;
  }

  .selected-attachment__remove {
    width: 100%;
  }

  .reimbursement-sheet {
    margin-left: 0;
    margin-right: 0;
    overflow-x: visible;
    border-color: var(--border);
  }

  .sheet-header,
  .sheet-row,
  .sheet-grid,
  .expense-table,
  .sheet-section-title,
  .sheet-signatures {
    min-width: 0;
  }

  .sheet-header {
    grid-template-columns: 1fr;
  }

  .sheet-logo,
  .sheet-title,
  .sheet-meta {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid #111827;
  }

  .sheet-logo {
    min-height: 64px;
  }

  .sheet-title {
    min-height: 50px;
  }

  .sheet-row--period,
  .sheet-grid--two,
  .sheet-field--city,
  .sheet-dates,
  .sheet-signatures {
    grid-template-columns: 1fr;
  }

  .sheet-cell,
  .sheet-field {
    min-height: auto;
    border-right: 0;
    padding: 12px;
  }

  .sheet-label {
    justify-content: start;
  }

  .sheet-options ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sheet-dates>span {
    grid-column: auto;
  }

  .sheet-section-title {
    padding: 10px 12px;
  }

  .expense-table {
    display: block;
    border-bottom: 1px solid #111827;
  }

  .expense-head {
    display: none;
  }

  .expense-row {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid #111827;
  }

  .expense-row--removed {
    display: none;
  }

  .expense-cell {
    min-height: auto;
    border: 0;
    padding: 0;
    gap: 5px;
  }

  .expense-cell::before {
    color: var(--heading);
    font-weight: 800;
  }

  .expense-date::before {
    content: "Data do Gasto";
  }

  .expense-city::before {
    content: "Local do Gasto - Cidade";
  }

  .expense-uf::before {
    content: "UF";
  }

  .expense-type::before {
    content: "Tipo de Despesa";
  }

  .expense-amount::before {
    content: "R$ de Reembolso";
  }

  .expense-date input {
    min-width: 0;
  }

  .expense-action {
    margin-top: 4px;
  }

  .expense-total-label,
  .expense-total-value {
    border-right: 0;
    padding: 12px;
  }

  .expense-total-label {
    border-bottom: 0;
  }

  .expense-total-value {
    border-bottom: 0;
    font-size: 1.08rem;
  }

  .sheet-signatures {
    gap: 34px;
    padding: 38px 18px 16px;
  }

  .site-footer__main {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 30px 18px;
  }

  .site-footer__nav,
  .site-footer__social {
    justify-content: flex-start;
    gap: 12px;
  }

  .site-footer__nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer__bottom div {
    padding: 10px 18px;
  }
}