/* Reset e configurações básicas */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  background-color: #f5f6f8;
  color: #4a4a4a;
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
}

.logo {
  margin-bottom: 30px;
}

.logo img {
  max-width: 200px;
  height: auto;
  border-radius: 16px;
}

.welcome-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: #4a4a4a;
  margin-bottom: 10px;
}

.welcome-subtitle {
  font-size: 1.1rem;
  color: #a0a0a0;
  margin-bottom: 20px;
}

/* Main Content */
.main-content {
  margin-bottom: 60px;
}

.cards-container {
  display: flex;
  gap: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 50px 40px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-width: 350px;
  max-width: 400px;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-icon {
  width: 60px;
  height: 60px;
  background-color: #f5f6f8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 25px;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #4a4a4a;
  margin-bottom: 30px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  min-width: 180px;
}

.btn-client {
  background-color: #2c2c4a;
  color: white;
}

.btn-client:hover {
  background-color: #e53935;
  transform: translateY(-2px);
}

.btn-revenda {
  background-color: #2c2c4a;
  color: white;
}

.btn-revenda:hover {
  background-color: #e53935;
  transform: translateY(-2px);
}

.btn-login {
  background-color: #e53935;
  color: white;
  padding: 15px 30px;
  font-size: 1.1rem;
  min-width: 200px;
}

.btn-login:hover {
  background-color: #c62828;
  transform: translateY(-2px);
}

/* Login Section */
.login-section {
  text-align: center;
  width: 100%;
  max-width: 600px;
}

.separator {
  position: relative;
  margin-bottom: 30px;
}

.separator::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #a0a0a0;
  z-index: 1;
}

.separator-text {
  background-color: #f5f6f8;
  color: #a0a0a0;
  padding: 0 20px;
  position: relative;
  z-index: 2;
  font-size: 0.9rem;
}

.login-subtitle {
  color: #a0a0a0;
  font-size: 0.9rem;
  margin-top: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .welcome-title {
    font-size: 2rem;
  }

  .cards-container {
    flex-direction: column;
    align-items: center;
  }

  .card {
    min-width: 100%;
    max-width: 400px;
  }
}

@media (max-width: 480px) {
  .welcome-title {
    font-size: 1.8rem;
  }

  .welcome-subtitle {
    font-size: 1rem;
  }

  .card {
    padding: 30px 20px;
  }

  .btn {
    min-width: 160px;
    padding: 10px 20px;
  }
}

/* ============================================
   AUTHENTICATION PAGES STYLES
   ============================================ */

/* Auth Body with two-tone background */
.auth-body {
  background: linear-gradient(
    to bottom,
    #2c2c4a 0%,
    #2c2c4a 20%,
    #f5f6f8 20%,
    #f5f6f8 100%
  );
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Auth Container */
.auth-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

/* Auth Card */
.auth-card {
  background: white;
  border-radius: 20px;
  padding: 50px 60px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  min-height: 600px;
  display: flex;
  flex-direction: column;
}

/* Auth Logo */
.auth-logo {
  text-align: center;
  margin-bottom: 30px;
}

.auth-logo img {
  max-width: 150px;
  height: auto;
  border-radius: 12px;
}

/* Auth Separator */
.auth-separator {
  height: 1px;
  background-color: #e0e0e0;
  margin-bottom: 40px;
}

/* Auth Content */
.auth-content {
  flex: 1;
}

/* Form Header */
.form-header {
  text-align: center;
  margin-bottom: 40px;
}

.form-title {
  font-size: 2rem;
  font-weight: bold;
  color: #2c2c4a;
  margin-bottom: 10px;
}

.form-subtitle {
  font-size: 1rem;
  color: #a0a0a0;
}

/* Form Styles */
.registration-form,
.login-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-section {
  margin-bottom: 35px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.section-icon {
  flex-shrink: 0;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #4a4a4a;
}

/* Form Groups */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: #4a4a4a;
  margin-bottom: 8px;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  color: #4a4a4a;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #2c2c4a;
  background-color: white;
}

.form-group input::placeholder {
  color: #a0a0a0;
}

/* Input with Button */
.input-with-button {
  display: flex;
  gap: 10px;
}

.input-with-button input {
  flex: 1;
}

.btn-send-code {
  padding: 12px 24px;
  background-color: #2c2c4a;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.btn-send-code:hover {
  background-color: #e53935;
}

/* Checkbox Groups */
.checkbox-group {
  margin-bottom: 20px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.checkbox-text strong {
  font-size: 0.95rem;
  color: #4a4a4a;
  font-weight: 600;
}

.checkbox-description {
  font-size: 0.85rem;
  color: #a0a0a0;
  line-height: 1.4;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  padding: 15px;
  background-color: #2c2c4a;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.btn-submit:hover {
  background-color: #e53935;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(229, 57, 53, 0.3);
}

/* Auth Footer */
.auth-footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

.back-link {
  color: #a0a0a0;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: #4a4a4a;
}

/* Consentimento page footer links row */
.footer-links-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
}

/* Responsive Design for Auth Pages */
@media (max-width: 768px) {
  .auth-card {
    padding: 40px 30px;
    border-radius: 15px;
  }

  .form-title {
    font-size: 1.6rem;
  }

  .input-with-button {
    flex-direction: column;
  }

  .btn-send-code {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 30px 20px;
  }

  .form-title {
    font-size: 1.4rem;
  }

  .section-title {
    font-size: 1rem;
  }
}

/* ============================================
   DASHBOARD LAYOUT STYLES
   ============================================ */

.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background-color: #f5f6f8;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background-color: #212237;
  color: white;
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-header {
  text-align: center;
  margin-bottom: 40px;
}

.sidebar-logo {
  margin-bottom: 15px;
  text-align: center;
  background-color: #212237;
  padding: 15px;
  border-radius: 12px;
}

.sidebar-logo img {
  max-width: 150px;
  height: auto;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}

.sidebar-separator {
  width: 80%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.3);
  margin: 15px auto 0;
}

.sidebar-nav {
  flex: 1;
}

.sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li {
  margin-bottom: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  border-radius: 8px;
  color: white;
  text-decoration: none;
  font-size: 1.05rem;
  transition: background-color 0.3s ease;
}

.nav-item .nav-icon {
  margin-right: 15px;
}

.nav-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.nav-item.active {
  background-color: #e53935;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(229, 57, 53, 0.3);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 15px;
  border-radius: 8px;
  color: white;
  text-decoration: none;
  font-size: 1.05rem;
  transition: background-color 0.3s ease;
}

.logout-btn .logout-icon {
  margin-right: 10px;
}

.logout-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 40px;
  background-color: #f5f6f8;
  overflow-y: auto;
}

.dashboard-page {
  max-width: 1200px;
}

.page-title {
  font-size: 2rem;
  color: #333;
  margin-bottom: 30px;
  font-weight: 600;
}

/* Info Cards */
.info-card {
  background: white;
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.section-icon {
  flex-shrink: 0;
}

.section-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #4a4a4a;
  margin: 0;
}

/* Info Fields */
.info-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
}

.info-field:last-child {
  border-bottom: none;
}

.field-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: #4a4a4a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.edit-icon {
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.edit-icon:hover {
  opacity: 1;
}

.field-value {
  font-size: 0.95rem;
  color: #666;
}

/* Form Groups in Dashboard */
.dashboard-page .form-group {
  margin-bottom: 20px;
}

.dashboard-page .form-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  color: #4a4a4a;
  margin-bottom: 8px;
}

.dashboard-page .form-group input,
.dashboard-page .form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  color: #4a4a4a;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
}

.dashboard-page .form-group input:focus,
.dashboard-page .form-group select:focus {
  outline: none;
  border-color: #2c2c4a;
  background-color: white;
}

/* Upload Section */
.upload-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #4a4a4a;
  margin-bottom: 20px;
}

.upload-area {
  border: 2px dashed #d0d0d0;
  border-radius: 12px;
  padding: 60px 40px;
  text-align: center;
  background-color: #fafafa;
  transition: all 0.3s ease;
}

.upload-area:hover {
  border-color: #2c2c4a;
  background-color: #f5f5f5;
}

.upload-icon {
  margin: 0 auto 20px;
  opacity: 0.6;
}

.upload-text-bold {
  font-size: 1.1rem;
  font-weight: 600;
  color: #4a4a4a;
  margin-bottom: 8px;
}

.upload-text {
  font-size: 0.95rem;
  color: #a0a0a0;
  margin-bottom: 20px;
}

.upload-btn {
  padding: 12px 30px;
  background-color: #e0e0e0;
  color: #4a4a4a;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-btn:hover {
  background-color: #d0d0d0;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
}

.tab-btn {
  padding: 12px 30px;
  background-color: white;
  color: #4a4a4a;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tab-btn:hover {
  background-color: #f5f5f5;
}

.tab-btn.active {
  background-color: #e53935;
  color: white;
  box-shadow: 0 4px 10px rgba(229, 57, 53, 0.3);
}

/* Table */
.table-container {
  background: white;
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  overflow-x: auto;
}

.warranty-table {
  width: 100%;
  border-collapse: collapse;
}

.warranty-table thead {
  background-color: #f8f9fa;
}

.warranty-table th {
  padding: 15px;
  text-align: left;
  font-weight: 600;
  color: #4a4a4a;
  font-size: 0.9rem;
  border-bottom: 2px solid #e0e0e0;
}

.warranty-table td {
  padding: 15px;
  border-bottom: 1px solid #f0f0f0;
  color: #666;
  font-size: 0.95rem;
}

.warranty-table tbody tr:hover {
  background-color: #f8f9fa;
}

/* Status Badges */
.status-badge {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
}

.status-pendente {
  background-color: #ffb300;
  color: white;
}

.status-ativa {
  background-color: #4caf50;
  color: white;
}

/* Responsive Design for Dashboard */
@media (max-width: 1024px) {
  .sidebar {
    width: 240px;
  }
}

@media (max-width: 768px) {
  .dashboard-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    padding: 20px;
  }

  .sidebar-header {
    margin-bottom: 20px;
  }

  .sidebar-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .sidebar-nav li {
    margin: 0;
  }

  .nav-item {
    padding: 10px 15px;
    font-size: 0.95rem;
  }

  .main-content {
    padding: 20px;
  }

  .page-title {
    font-size: 1.6rem;
  }

  .info-card {
    padding: 20px;
  }

  .warranty-table {
    font-size: 0.85rem;
  }

  .warranty-table th,
  .warranty-table td {
    padding: 10px 8px;
  }
}

/* ============================================
   ADMIN PAGES STYLES
   ============================================ */

.admin-page {
  padding: 20px;
  background-color: #f5f5f5;
  min-height: 100vh;
}

.page-header {
  margin-bottom: 20px;
}

.page-title {
  font-size: 28px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.content-card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.tabs-container {
  border-bottom: 1px solid #e5e5e5;
}

.tabs {
  display: flex;
  margin: 0;
  padding: 0;
}

.tab-button {
  background: none;
  border: none;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.tab-button.active {
  background-color: #dc2626;
  color: white;
}

.tab-button:hover:not(.active) {
  background-color: #f5f5f5;
  color: #333;
}

.table-container {
  overflow-x: auto;
}

.warranty-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.warranty-table thead {
  background-color: #f8f9fa;
}

.warranty-table th {
  padding: 16px 12px;
  text-align: left;
  font-weight: 600;
  color: #666;
  border-bottom: 1px solid #e5e5e5;
}

.warranty-table th.details-column {
  color: #dc2626;
}

.warranty-table td {
  padding: 16px 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
  text-align: left;
}

.warranty-table tbody tr:hover {
  background-color: #f8f9fa;
}

.client-cell {
  min-width: 200px;
}

.client-info {
  display: flex;
  flex-direction: column;
}

.client-name {
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.client-email {
  font-size: 12px;
  color: #666;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  text-align: center;
}

.status-badge.pending {
  background-color: #fef3c7;
  color: #92400e;
}

.status-badge.active {
  background-color: #d1fae5;
  color: #065f46;
}

.details-cell {
  text-align: left;
}

.details-btn {
  background-color: #dc2626;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.details-btn:hover {
  background-color: #b91c1c;
}

/* Simple details button styling */
.details-btn {
  background-color: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
  text-align: center;
}

.details-btn:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
  color: #212529;
}

/* Responsive design for admin pages */
@media (max-width: 768px) {
  .admin-page {
    padding: 10px;
  }

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

  .warranty-table th,
  .warranty-table td {
    padding: 12px 8px;
  }

  .client-cell {
    min-width: 150px;
  }
}

.status-negada {
  background-color: #e53935; /* Mesma cor vermelha do btn-login */
  color: white;
}

/* Estilos para edição de campos */
.info-field.editable .edit-icon {
  opacity: 0.5;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.info-field.editable .edit-icon:hover {
  opacity: 1;
  transform: scale(1.1);
}

.edit-input {
  padding: 8px 12px !important;
  border: 1px solid #2c2c4a !important;
  border-radius: 6px !important;
  font-size: 0.95rem !important;
  font-family: inherit !important;
  color: #4a4a4a !important;
  background-color: #fff !important;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.edit-input:focus {
  outline: none !important;
  border-color: #2c2c4a !important;
  box-shadow: 0 0 0 3px rgba(44, 44, 74, 0.1) !important;
}

.edit-input::placeholder {
  color: #999;
}

.tabs {
  display: flex;
  gap: 15px; /* Espaçamento entre os botões */
  margin-bottom: 20px;
  flex-wrap: wrap; /* Garante que quebre linha em telas pequenas */
}

.tab-btn {
  cursor: pointer;
  padding: 10px 20px;
  background-color: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-weight: 500;
  color: #4b5563;
  transition: all 0.2s ease-in-out;
}

.tab-btn:hover {
  background-color: #e5e7eb;
  transform: translateY(-1px); /* Pequeno efeito visual ao passar o mouse */
}

.tab-btn.active {
  background-color: #dc2626; /* Vermelho WiWU */
  color: white;
  border-color: #dc2626;
  box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

/* --- Ajustes Gerais para Tabelas em Abas --- */
.table-container {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   HISTÓRICO DE GARANTIAS STYLES
   ============================================ */

.warranty-history-section {
  margin-top: 40px;
}

.section-title-lg {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #333;
  font-weight: 600;
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-thumb {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  object-fit: cover;
}

.empty-state {
  padding: 20px;
  text-align: center;
  color: #666;
}

.validity-days {
  font-weight: 700;
}

.validity-days.validity-success {
  color: #15803d;
}

.validity-days.validity-warning {
  color: #d97706;
}

.validity-date {
  font-size: 0.75rem;
  color: #888;
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.text-success {
  color: #15803d;
}

.text-warning {
  color: #d97706;
}

.text-danger {
  color: #991b1b;
}

/* Status Badge - Expirada */
.status-expirada {
  background-color: #6b7280;
  color: white;
}

/* ============================================
   IMAGE PREVIEW STYLES
   ============================================ */

/* Grid para múltiplas imagens (fotos do produto) */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  margin-top: 20px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.preview-item {
  position: relative;
  text-align: center;
}

.preview-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid #e0e0e0;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.preview-item img:hover {
  border-color: #2c2c4a;
}

.preview-label {
  display: block;
  font-size: 0.75rem;
  color: #666;
  margin-top: 5px;
}

/* Botão X para remover foto individual */
.btn-remove-foto {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background-color: #e53935;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.btn-remove-foto:hover {
  background-color: #c62828;
  transform: scale(1.15);
}

/* Preview única imagem (cupom fiscal) */
.preview-single {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  width: 100%;
}

.preview-single-wrapper {
  position: relative;
  display: inline-block;
}

.preview-single img {
  max-width: 100%;
  max-height: 250px;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: block;
}

/* Botão para remover imagem */
.btn-remove-preview {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 28px;
  height: 28px;
  background-color: #e53935;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease, transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  z-index: 10;
}

.btn-remove-preview:hover {
  background-color: #c62828;
  transform: scale(1.1);
}

/* Responsivo para preview */
@media (max-width: 768px) {
  .preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
  }

  .preview-item img {
    height: 80px;
  }

  .preview-single img {
    max-height: 200px;
  }
}

/* ============================================
   MENSAGENS DE VALIDAÇÃO (Toast/Inline)
   ============================================ */

.form-message {
  display: none;
  padding: 14px 20px;
  border-radius: 8px;
  margin-top: 15px;
  font-size: 0.95rem;
  font-weight: 500;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease-out;
}

.form-message.show {
  display: flex;
}

.form-message.error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.form-message.warning {
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  color: #d97706;
}

.form-message.success {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #16a34a;
}

.form-message .message-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.form-message .message-text {
  flex: 1;
}

.form-message .message-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  padding: 0;
  line-height: 1;
}

.form-message .message-close:hover {
  opacity: 1;
}

.form-message.error .message-close {
  color: #dc2626;
}

.form-message.warning .message-close {
  color: #d97706;
}

.form-message.success .message-close {
  color: #16a34a;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-5px);
  }
  40%,
  80% {
    transform: translateX(5px);
  }
}



/* ======================
   RESPONSIVE SIDEBAR
   ====================== */

.menu-toggle {
  display: none;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 2000;
  background: #212237;
  color: white;
  border: none;
  font-size: 22px;
  padding: 10px 14px;
  border-radius: 6px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100vh;
    width: 260px;
    transition: left 0.3s ease;
    z-index: 1500;
  }

  body.sidebar-open .sidebar {
    left: 0;
  }

  .main-content {
    padding: 20px;
  }
}


/* Estilos para validação de campos */
.input-valid {
    border-color: #10b981 !important;
    background-color: #f0fdf4;
}

.input-invalid {
    border-color: #ef4444 !important;
    background-color: #fef2f2;
}

.validation-feedback {
    display: block;
    font-size: 0.85rem;
    margin-top: 5px;
    font-weight: 500;
}

.validation-feedback.valid {
    color: #10b981;
}

.validation-feedback.invalid {
    color: #ef4444;
}

/* Animação para feedback */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.validation-feedback {
    animation: fadeIn 0.3s ease-out;
}
