body {
  font-family: 'Inter', sans-serif;
  background-color: #fff;
  margin: 0;
  padding: 0;
  color: #333;
  overflow-x: hidden;
  max-width: 100vw;
}

* {
  box-sizing: border-box;
}

.container {
  margin: 5rem auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.token-box {
  font-family: monospace;
  font-size: 2rem;
  background-color: #f5f3f0;
  border: 1px solid #e4e1da;
  padding: 1rem;
  text-align: center;

  letter-spacing: 0.1em;
}

form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

input,
select {
  width: 100%;
  padding: 1.2rem;
  border: 1px solid #e4e1da;
  background-color: #faf9f6;
  font-size: 1.8rem;
  color: #333;
  outline: none;
  appearance: none;

  box-sizing: border-box;
}

select {
  background-image: url('data:image/svg+xml;utf8,<svg fill="%23666" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1rem;
}

button {
  width: 100%;
  padding: 1.2rem;
  background-color: #88817a;
  color: white;
  border: none;
  font-size: 1rem;

  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: background 0.3s ease;
}

button:hover {
  background-color: #6f6861;
}

a {
  text-align: center;
  display: block;
  margin-top: 2rem;
  color: #888;
  font-size: 0.9rem;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}
.token-wrapper {
  position: relative;
  margin-bottom: 1rem;
}

.token-label {
  position: absolute;
  top: -0.6rem;
  left: 0.75rem;
  font-size: 0.75rem;
  background: #fff;
  padding: 0 0.25rem;
  color: #666;
  font-family: 'Inter', sans-serif;
}

.token-box {
  font-family: monospace;
  font-size: 2rem;
  background-color: #fefdfb;
  border: 1px solid #e4e1da;
  padding: 1rem;
  text-align: left;

  letter-spacing: 0.1em;
}

h1 {
  font-size: 2.5rem;
  font-weight: 100;
  text-align: left;
}

/* HEADER */
.header {
  color: #222;
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid #e4e1da;
}

.header h1 {
  font-size: 1.5rem;
  margin: 0;
  font-weight: 300;
}

/* MENU FIXO RODAPÉ MOBILE */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid #e4e1da;
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 0;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #666;
  padding: 0.5rem;
  flex: 1;
  transition: all 0.2s ease;
}

.nav-item:hover {
  color: #88817a;
  background: #faf9f6;
}

.nav-icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.nav-label {
  font-size: 0.75rem;
  font-weight: 500;
}

.content {
  padding: 1rem;
  padding-bottom: 5rem;
  flex: 1;
  animation: slideFromRight 0.3s ease forwards;
}

@keyframes slideFromRight {
  from {
    opacity: 0;
    margin-left: 30px;
  }
  to {
    opacity: 1;
    margin-left: 0;
  }
}

/* TABELA RESPONSIVA */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  background: #fff;
}

table th,
table td {
  padding: 0.75rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid #e4e1da;
}

table th {
  background: #f5f3f0;
  font-weight: 600;
  color: #333;
  position: sticky;
  top: 0;
}

table tr:hover {
  background: #faf9f6;
}

/* MOBILE: CARDS EM VEZ DE TABELA */
@media (max-width: 768px) {
  .header h1 {
    font-size: 1.2rem;
  }

  .container {
    margin: 2rem auto;
    padding: 1rem;
    max-width: 100%;
  }

  .content {
    max-width: 100vw;
  }

  h1 {
    font-size: 1.8rem;
    word-wrap: break-word;
  }

  table thead {
    display: none;
  }

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

  table tr {
    margin-bottom: 1rem;
    border: 1px solid #e4e1da;
    border-radius: 8px;
    padding: 1rem;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    max-width: 100%;
  }

  table td {
    padding: 0.75rem 0;
    border: none;
    display: flex;

    align-items: flex-start;
    gap: 0.5rem;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    font-size: 0.9rem;
    min-height: 1.5rem;
  }

  table td:before {
    content: attr(data-label) ':';
    font-weight: 600;
    color: #666;
    flex-shrink: 0;
    min-width: 70px;
    max-width: 70px;
  }

  table td:last-child {
    text-align: center;
    justify-content: center;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid #e4e1da;
  }

  table td:last-child:before {
    content: none;
  }

  table td a {
    font-size: 1.5rem;
    text-decoration: none;
  }

  input,
  select,
  button {
    max-width: 100%;
  }
}

.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: white;
  padding: 12px 20px;
  border-radius: 5px;
  opacity: 0;
  transition: opacity 0.3s ease, bottom 0.3s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  bottom: 100px;
}

.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

h2 {
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 1rem;
}

.token-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.token-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.token-code {
  background: #f5f3f0;
  padding: 0.75rem 1rem;
  font-family: monospace;
  font-size: 1rem;
  border-radius: 4px;
  min-width: 120px;
  text-align: center;
}

.token-date {
  display: flex;
  flex-direction: column;
  font-size: 0.75rem;
  color: #777;
}

.token-date-box {
  border: 1px solid #e4e1da;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  background: #fff;
  font-size: 0.95rem;
  margin-top: 0.2rem;
  color: #333;
}

.token-remove {
  background: #88817aad;
  border: none;
  color: white;
  font-size: 1rem;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.token-remove:hover {
  background: #6f6861;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 0.5rem;
  max-width: 600px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

tr .delete-btn {
  opacity: 0;
  transition: opacity 0.2s ease;
}

tr:hover .delete-btn {
  opacity: 1;
}
.delete-btn {
  opacity: 0;
  transition: opacity 0.2s ease;
}

tr:hover .delete-btn {
  opacity: 1;
}
