* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  background: linear-gradient(180deg, #fff7f0 0%, #ffe9db 100%);
  color: #333;
}

header {
  background: linear-gradient(135deg, #ffdab9, #ffc9a6);
  color: #5a3e2b;
  padding: 28px 20px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

header h1 {
  margin: 0;
  font-size: 30px;
}

header p {
  margin: 8px 0 0;
  opacity: 0.9;
}

.container {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 16px;
}

.card {
  background: white;
  padding: 22px;
  margin-bottom: 22px;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border-left: 6px solid #ffdab9;
}

h2 {
  margin-top: 0;
  color: #b36b3f;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.grid textarea {
  grid-column: span 2;
  min-height: 90px;
}

.grid input,
.grid textarea {
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  border: 1px solid #f3d5c0;
  background: #fffaf6;
  outline: none;
}

.grid input:focus,
.grid textarea:focus {
  border-color: #ffdab9;
  box-shadow: 0 0 0 3px rgba(255, 218, 185, 0.4);
}

.search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.search-row input {
  flex: 1;
  padding: 11px;
  border-radius: 10px;
  border: 1px solid #f3d5c0;
  background: #fffaf6;
}

button {
  padding: 11px 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.2s;
}

button.primary {
  background: #ffdab9;
  color: #5a3e2b;
}

button.primary:hover {
  background: #ffc9a6;
}

button.success {
  background: #6bbf59;
  color: white;
}

button.danger {
  background: #d9534f;
  color: white;
}

button.secondary {
  background: #eee;
}

table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 14px;
  overflow: hidden;
}

th {
  background: #ffe4d1;
  color: #7a4c2c;
}

th,
td {
  padding: 12px;
  border: 1px solid #f5d8c7;
}

tr:nth-child(even) {
  background: #fff7f0;
}

tr:hover {
  background: #ffe9db;
  cursor: pointer;
}

/* Modal */
/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: linear-gradient(180deg, #fffaf6 0%, #fff1e6 100%);
  border-radius: 18px;
  padding: 24px;
  width: 60%;
  max-width: 800px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  animation: aparecer 0.25s ease;
  position: relative;
  border-top: 6px solid #ffdab9;
}

.close {
  position: absolute;
  right: 18px;
  top: 12px;
  font-size: 28px;
  cursor: pointer;
  color: #a05a2c;
  transition: 0.2s;
}

.close:hover {
  color: #ff8c42;
  transform: scale(1.1);
}

.modal-title {
  margin-top: 0;
  color: #b36b3f;
  margin-bottom: 15px;
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.modal-grid input,
.modal-grid textarea {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #f3d5c0;
  background: #fffaf6;
}

.modal-grid input:disabled,
.modal-grid textarea:disabled {
  background: #f7f3ef;
  color: #555;
}

.modal-grid textarea {
  grid-column: span 2;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.file-box {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #fff3e6;
  border: 1px solid #ffdab9;
}

.file-box a {
  color: #b36b3f;
  font-weight: 600;
  text-decoration: none;
}

.file-box a:hover {
  text-decoration: underline;
}

/* Animação */
@keyframes aparecer {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.login-body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(180deg, #fff7f0 0%, #ffe9db 100%);
}

.login-box {
  width: 100%;
  max-width: 420px;
  background: white;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  text-align: center;
  border-top: 6px solid #ffdab9;
}

.login-box h1 {
  margin-top: 0;
  color: #7a4c2c;
}

.login-box p {
  color: #666;
  margin-bottom: 20px;
}

.login-box form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-box input {
  padding: 12px;
  border: 1px solid #f3d5c0;
  border-radius: 10px;
  background: #fffaf6;
  outline: none;
}

.login-box input:focus {
  border-color: #ffdab9;
  box-shadow: 0 0 0 3px rgba(255, 218, 185, 0.35);
}

.erro-login {
  color: #d9534f;
  min-height: 20px;
  margin-top: 12px;
}

.logout-btn {
  margin-top: 14px;
}

table {
  font-size: 14px;
}

th,
td {
  padding: 10px 8px;
}
