/* ==================== CSS VARIABLES ==================== */
:root {
  --bs-font-sans-serif: 'Poppins', sans-serif;
  --bs-font-base: 'Poppins', sans-serif;
  --icon-param-action-color: #495057;
  --brand-yellow: #FDB913;
  --primary-btn: #3085d6;
  --primary-btn-hover: #2874c5;
  --danger-btn: #d33;
}

/* ==================== GLOBAL / TYPOGRAPHY ==================== */
body, html {
  font-family: var(--bs-font-sans-serif);
  color: #495057;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.content {
  padding: 1.5rem;
  background: #F0F0F0;
  color: #23272b;
}

/* Use tag selector for headings, not class .h3 */
h1, h2, h3, h4, h5 {
  color: #495057 !important; /* Bootstrap card-header color */
}

/* ==================== SIDEBAR ==================== */
.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
}

.sidebar-logo {
  max-height: 40px;
  width: auto;
  margin-right: 10px;
}

.sidebar-link {
  font-size: 0.8rem;
}

/* ==================== SEARCH ==================== */
.search-container {
  width: 60%;
  margin: 0 auto;
}

/* ==================== IMAGES ==================== */
.image-container {
  width: 80%;
  padding-top: 80%; /* 1:1 Aspect ratio */
  position: relative;
  margin: 0 auto;
}

#image-preview {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 80%;
  height: 80%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  border: 2px solid rgba(0,0,0,0.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  box-sizing: border-box;
}

/* ==================== CARD STYLES ==================== */
.card {
  border-radius: 10px;
  box-shadow: 0 6px 16px -4px rgba(0,0,0,0.13), 6px 0 16px -8px rgba(0,0,0,0.10);
  background: #fff !important;
}

.card.h-100 {
    min-height: 0 !important;
    margin-bottom: 0 !important;

}




/* Responsive chart sizing inside cards */
.card .chart-xs,
.card .chart-lg,
.card .chart-sm {
  width: 100% !important;
  height: 100% !important;
  min-height: 120px;
}
.card.flex-fill {
  min-height: 340px;
  height: 100%;
}
.card .chart-xs {
  min-width: 120px;
  min-height: 120px;
  max-width: 100%;
  max-height: 220px;
}
@media (max-width: 991.98px) {
  .card .chart-xs {
    min-width: 80px;
    min-height: 80px;
  }
  .card .table {
    font-size: 0.7rem;
  }
}
@media (max-width: 767.98px) {
  .card-body.d-flex.flex-column.justifique-content-between.h-100 > .d-flex.flex-row.h-100.align-items-center {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .card .chart-xs {
    min-width: 0;
    min-height: 100px;
    margin-bottom: 10px;
  }
  .card .table {
    font-size: 0.7rem;
  }
}

/* ==================== TABLES ==================== */
.table-responsive thead th {
  background-color: var(--brand-yellow) !important;
}
table.table tr {
  line-height: 1.2;
}

/* ==================== ICONS ==================== */
.icon-param-action {
  vertical-align: middle;
  font-size: 30px;
  color: var(--icon-param-action-color);
}

/* ==================== LOGIN PAGE ==================== */
.login-container-allto {
  background: #fff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  text-align: center;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  font-family: var(--bs-font-sans-serif);
}
.login-container-allto img {
  width: 150px;
  margin-bottom: 20px;
}
.login-container-allto h2 {
  color: #2c2c2c;
  font-weight: 600;
  margin-bottom: 20px;
}
.login-container-allto .form-group {
  margin-bottom: 15px;
}
.login-container-allto .form-group label {
  display: block;
  margin-bottom: 5px;
}
.login-container-allto .form-group input,
.login-container-allto button {
  width: 100%;
  padding: 10px;
  border: 1px solid #495057;
  border-radius: 4px;
  box-sizing: border-box;
}
.login-container-allto button {
  background: #007bff;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  margin-top: 10px;
  transition: background 0.2s;
}
.login-container-allto button:hover {
  background: #0056b3;
}
.login-container-allto .message {
  font-size: 14px;
  margin-top: 15px;
  color: red;
}
.login-container-allto .password-container {
  position: relative;
}
.login-container-allto .password-container input {
  padding-right: 40px;
}
.login-container-allto .password-container .toggle-password {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 24px;
  color: #495057;
  transition: color 0.2s;
}
.login-container-allto .password-container .toggle-password:hover {
  color: #495057;
}
body.login-page-allto, html.login-page-allto {
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}
body.login-page-allto {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2c2c2c;
}
.login-container-allto {
  margin-top: 0 !important;
}
.login-container-allto.login-container-wide {
  max-width: 520px;
}

/* ==================== SWEETALERT2 ==================== */
.swal-wide { width: 600px !important; }
.swal-extra-wide { width: 800px !important; }
.swal-smaller-popup { font-size: 12px !important; }
.swal-header {
  font-weight: bold;
  font-size: 12px;
  color: #495057;
}
.swal-footer {
  text-align: center;
  font-size: 12px;
  color: #495057;
}
.swal-button,
.swal2-confirm {
  background: var(--primary-btn) !important;
  color: #fff !important;
  border-radius: 5px !important;
  padding: 10px 20px !important;
  border: none !important;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.swal-button:hover,
.swal2-confirm:hover {
  background: var(--primary-btn-hover) !important;
}
.swal2-cancel {
  background: var(--danger-btn) !important;
  color: #fff !important;
  border-radius: 5px !important;
  padding: 10px 20px;
  border: none !important;
  font-weight: 500;
  font-size: 0.9rem;
}
.swal2-popup {
  font-family: var(--bs-font-sans-serif) !important;
  font-size: 1rem;
  border-radius: 10px;
  padding: 20px;
  animation: none !important;
  transition: none !important;
  color: #495057 !important;
}
.swal2-title,
.swal2-html-container {
  color: #495057 !important;
}
.swal2-title {
  font-weight: 600;
  font-size: 1.2rem !important;
  text-align: center !important;
  width: 100%;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.swal2-html-container.produto-img-modal { font-size: 0.85em !important; }

/* Ajuda Modal */
.swal-ajuda-modal {
  max-width: 1100px !important;
  min-width: 700px;
}
.ajuda-modal-content {
  font-size: 0.75rem;
  max-width: 1000px;
  margin: auto;
}
.swal-ajuda-modal .swal2-title { font-size: 1.1rem !important; }

/* SweetAlert2 Small Input */
.swal2-input.swal2-input-sm {
  font-size: 0.75rem !important;
  height: 28px !important;
  padding: 3px 7px !important;
  display: block;
  margin: 0 auto;
  text-align: center;
}

/* =============SweetAlert2 Flatpickr Customization =================*/
.swal2-popup .flatpickr-calendar,
.swal2-popup .flatpickr-time input,
.swal2-popup .flatpickr-day,
.swal2-popup .flatpickr-monthDropdown-months,
.swal2-popup .flatpickr-current-month,
.swal2-popup .flatpickr-weekday {
  font-size: 0.68rem !important;
  font-family: var(--bs-font-sans-serif) !important;
  padding: 0 !important;
  min-width: 0 !important;
  max-width: 220px !important;
}
.swal2-popup .flatpickr-calendar {
  min-width: 180px !important;
  max-width: 220px !important;
}

/* ==================== SWIPER (DASHBOARD CARDS) ==================== */
.swiper-slide > .container-fluid > .row.flex-grow-1 > .col-12 .card,
.swiper-slide > .container-fluid > .row.w-100 > [class*="col-"] .card {
  height: 100%;
  min-height: 0;
  box-shadow: 0 6px 16px -4px rgba(0,0,0,0.13), 6px 0 16px -8px rgba(0,0,0,0.10);
  border-radius: 18px !important;
  overflow: hidden;
}
.swiper-slide > .container-fluid > .row.flex-grow-1 > .col-12 .card > .card-header,
.swiper-slide > .container-fluid > .row.w-100 > [class*="col-"] .card > .card-header {
  border-top-left-radius: 18px !important;
  border-top-right-radius: 18px !important;
}
.swiper-slide > .container-fluid > .row.flex-grow-1 > .col-12 .card > .card-body,
.swiper-slide > .container-fluid > .row.w-100 > [class*="col-"] .card > .card-body {
  border-bottom-left-radius: 18px !important;
  border-bottom-right-radius: 18px !important;
}
.swiper-slide > .container-fluid > .row.w-100 {
  height: 100% !important;
}
.swiper-slide > .container-fluid > .row.w-100 > [class*="col-"] {
  height: 50% !important;
  padding: 1vh 2vw !important;
  box-sizing: border-box;
}

@media (max-width: 991.98px) {
  .swiper-slide > .container-fluid > .row.w-100 > [class*="col-"] {
    height: auto !important;
    min-height: 300px;
    padding: 0.5rem !important;
  }
  .swiper-slide > .container-fluid > .row.flex-grow-1 > .col-12 .card {
    min-height: 300px;
  }
}

/* Swiper Pagination */
.vertical-swiper, .vertical-swiper .swiper-wrapper, .vertical-swiper .swiper-slide {
  height: calc(100vh - 100px);
}
.vertical-swiper .swiper-slide {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: none;
}
.swiper-pagination-vertical {
  right: 0 !important;
  left: auto !important;
  top: 50% !important;
  transform: translateY(-50%);
  align-items: center;
  justify-content: center;
  background: none;
}
.swiper-pagination-bullet {
  width: 16px;
  height: 16px;
  background: #ccc;
  opacity: 1;
  margin: 2px 0 !important;
  border-radius: 50%;
  border: none;
  transition: background 0.2s;
}
.swiper-pagination-bullet-active {
  background: var(--brand-yellow);
}


/* Reduce vertical space between sidebar links */
.sidebar-item {
  margin-bottom: 2px !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.sidebar-link {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  min-height: 32px !important; /* Optional: set a minimum height */
}

/* ==================== CUSTOM STYLES FOR DASHBOARD ==================== */
.swiper-slide .card #versaoTable,
.swiper-slide .card #cityTable,
.swiper-slide .card #regionTable,
.swiper-slide .card #countryTable,
.swiper-slide .card #filetypeTable,
.swiper-slide .card #fileformatTable,
.swiper-slide .card #avgFormatTable,
.swiper-slide .card #ispTable {
  font-size: 0.75rem !important;
}

/* === Toggle Tab Buttons (Ficha Cliente) and General Buttons === */
#tabToggleGroup .btn,
.btn.btn-outline-primary,
.btn.btn-primary,
.btn.btn-secondary {
    border-radius: 0;
    min-width: 90px;
    border-color: var(--brand-yellow) !important;
    color: var(--brand-yellow) !important;
    background: #fff !important;
    font-weight: 500;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

#tabToggleGroup .btn.active,
#tabToggleGroup .btn:active,
#tabToggleGroup .btn:focus,
.btn.btn-outline-primary.active,
.btn.btn-outline-primary:active,
.btn.btn-outline-primary:focus,
.btn.btn-primary,
.btn.btn-primary:active,
.btn.btn-primary:focus {
    background: var(--brand-yellow) !important;
    color: #23272b !important;
    border-color: var(--brand-yellow) !important;
    z-index: 1;
}

#tabToggleGroup .btn:hover:not(.active),
.btn.btn-outline-primary:hover,
.btn.btn-primary:hover,
.btn.btn-secondary:hover {
    background: #ffe9b3 !important;
    color: #23272b !important;
    border-color: var(--brand-yellow) !important;
}

/* Secondary button override for contrast */
.btn.btn-secondary,
.btn.btn-secondary:active,
.btn.btn-secondary:focus {
    background: #fff !important;
    color: var(--brand-yellow) !important;
    border-color: var(--brand-yellow) !important;
}
.btn.btn-secondary:hover {
    background: #ffe9b3 !important;
    color: #23272b !important;
    border-color: var(--brand-yellow) !important;
}

