:root {
  --template-header-height: 65px;
  --template-sidebar-width: 275px;
  --primary-dark: #19232D;
  --bg-color: #FAFAFA;
  --gap-sm: 8px;
  --gap-md: 16px;
}

*, html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  width: 100%;
  background: var(--bg-color);
  color: #183354;
}

a {
  text-decoration: none !important;
}

b {
  font-family: 'Poppins', sans-serif !important;
  font-weight: 600;
}

label {
  font-size: 0.9em;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  margin-bottom: 0;
}

//Scroll personalizado
body.associado-layout {
  scrollbar-width: thin;
  scrollbar-color: #0f1c29 #F7F7F7;
}

html::-webkit-scrollbar,
body.template-layout::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

html::-webkit-scrollbar-track,
body.template-layout::-webkit-scrollbar-track {
  background: #F7F7F7;
}

html::-webkit-scrollbar-thumb,
body.template-layout::-webkit-scrollbar-thumb {
  background: #0f1c29; 
  border-radius: 6px;
  border: 2px solid #F7F7F7; 
}

html::-webkit-scrollbar-thumb:hover,
body.template-layout::-webkit-scrollbar-thumb:hover {
  background: #152332;
}

.template-sidebar-fixed::-webkit-scrollbar {
  width: 10px;
}

.template-sidebar-fixed::-webkit-scrollbar-track {
  background: #F7F7F7;
}

.template-sidebar-fixed::-webkit-scrollbar-thumb {
  background: #0f1c29;
  border-radius: 6px;
  border: 2px solid #F7F7F7;
}

.template-sidebar-fixed::-webkit-scrollbar-thumb:hover {
  background: #152332;
}

//estrutura
.template-layout {
  padding-top: 0 !important;
  overflow: hidden;
  height: 100vh;
}

.template-layout .app-layout {
  position: fixed;
  top: var(--template-header-height);
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  overflow: hidden;
}

/* Header */
.template-header {
  height: var(--template-header-height);
  background: #fff;
  border-bottom: 1px solid rgba(150, 150, 150, 0.08);
  z-index: 1030;
}

.template-header .brand img {
  width: 148px;
  height: auto;
  max-height: var(--template-header-height);
  padding: 4px;
}

.template-header .title {
  font-weight: 400;
  font-size: 16px;
  margin-left: 12px;
  color: #19232D;
}

.template-header .actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.template-header .btn-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  color: #A5A7A9;
}

.template-header .actions .btn {
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.08);
  box-shadow: none;
  background: #fff;
  color: #19232D;
}

.template-header .actions .btn:hover {
  background: rgba(25,35,45,0.06);
  color: #19232D;
}

.template-header .avatar-letter {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #F3B600; 
  color: #fff;
  font-weight: 400;
  font-size: 14px;
  flex-shrink: 0;
}

.template-header .greeting {
  font-size: 13px;
  color: #19232D;
  font-weight: 600;
}

/* Sidebar fixa */
.template-sidebar-fixed {
  display: block;
  position: relative;
  top: 0;
  flex: 0 0 var(--template-sidebar-width);
  width: var(--template-sidebar-width);
  height: 100%;
  overflow-y: auto;
  background: linear-gradient(-222deg, rgb(25, 35, 45), rgba(25, 35, 45, 0.93));
  color: #cbd5e1;
  border-right: 1px solid #0b1622;
}

.template-sidebar-fixed nav {
  padding-top: 8px;
}

.template-sidebar-fixed .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  padding: 8px 12px;
  margin: 0 12px;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-radius: 8px;
}

.template-sidebar-fixed .nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.template-sidebar-fixed .nav-link.active {
  color: #111;
  background: #F3B600;
  border-radius: 8px;
}

.template-sidebar-fixed .nav-icon {
  width: 18px;
  height: 18px;
}

.template-sidebar-fixed .nav-link.active .nav-icon {
  filter: brightness(0);
}

.template-sidebar-fixed .nav-section {
  padding: 8px 14px;
  color: #9fb3c8;
  font-size: 10px;
  text-transform: uppercase;
  margin-top: var(--gap-sm);
}

@media (min-width: 768px) {
  .template-layout.painel-topnav .app-layout {
    flex-direction: column;
  }

  .template-layout.painel-topnav .template-sidebar-fixed {
    flex: 0 0 auto;
    width: 100%;
    height: 65px;
    max-height: 65px;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid #0b1622;
    display: flex;
    align-items: center;
  }

  .template-layout.painel-topnav .template-sidebar-fixed nav {
    padding-top: 0;
    width: 100%;
  }

  .template-layout.painel-topnav .template-sidebar-fixed .nav-section {
    display: none;
  }

  .template-layout.painel-topnav .template-sidebar-fixed ul.list-unstyled {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px;
  }

  .template-layout.painel-topnav .template-sidebar-fixed ul.list-unstyled > li {
    flex: 1 1 0;
    display: flex;
    justify-content: center;
  }

  .template-layout.painel-topnav .template-sidebar-fixed .nav-link {
    margin: 0;
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* Conteudo principal */
.template-layout main.content {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 24px;
  box-sizing: border-box;
  display: block;
  background-color: var(--bg-color);
}

.template-layout h1, .template-layout h4 {
  font-weight: 500;
  font-size: 18px;
  color: #19232D;
}

.template-layout .ssbtitle{
  font-weight: 400;
  font-size: 14px;
  color: #6D757F;
}

/* Select mes/ano */
.btn-date-selector,
.btn-date-selector span {
  background: transparent;
  border: none;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1.1rem !important;
  color: var(--clube-text-dark) !important;
  cursor: pointer;
}

.btn-date-selector:focus {
  box-shadow: none;
  outline: none;
}

.date-selector-container {
  position: relative;
  display: inline-block;
}

.date-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: #333; 
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1050;
  min-width: 280px;
  padding: 10px;
}

.date-dropdown-menu.show {
  display: block;
}

.date-header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 10px 10px 10px;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.current-year {
  font-size: 1rem;
}

.year-nav .btn-link {
  color: #fff !important;
  text-decoration: none;
  padding: 0 5px;
}

.months-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding-top: 10px;
}

.month-item {
  text-align: center;
  padding: 8px;
  color: #fff;
  cursor: pointer;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: background 0.2s;
}

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

.month-item.active {
  background: #444;
  font-weight: 600;
}

/* Botões */
.btn { 
  font-family: 'Poppins', sans-serif; 
  font-size: 14px; 
  font-weight: 400; 
  white-space: nowrap;
}

.btn-card {
  white-space: normal;
  padding: 20px;
}

.btn-primary, .btn-secondary, .btnDoarConvite {
  border: none; 
  border-radius: 6px; 
  padding: 6px 12px; 
  display: inline-flex; 
  align-items: center; 
  justify-content: center;  
}

.btn-primary { 
  background: #19232D; 
  color: #FFFFFF; 
}

.btn-primary:hover { 
  background: #121A24; 
  color: #FFFFFF; 
}

.btn-primary:focus,
.btn-primary.focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary:active:focus,
.btn-primary.active:focus,
.show > .btn-primary.dropdown-toggle,
.show > .btn-primary.dropdown-toggle:focus {
  background: #121A24 !important;
  color: #FFFFFF;
  border: none;
  box-shadow: none;
  outline: none;
}

.btn-secondary { 
  background: #e9e9e9; 
  color: #19232d; 
}

.btn-secondary:hover{ 
  background: #dcdcdc; 
  color: #19232d; 
}


/* Gerais */
.swal-text {
  text-align: center !important;
  padding: 12px !important;
  font-size: 14px !important;
}

.swal-title {
  font-size: 18px;
}

.row {
  margin-right: 0 !important;
  margin-left: 0 !important;
}

.gap-5 {
  gap: 5px;
}

.gap-12 {
  gap: 12px;
}

.alertWrapper {
  background: rgba(255, 141, 40, 0.08);
  color: #8A4D00;
  border-radius: 8px;
  padding: 12px;
  font-size: .85em;
}

.alertSuccess {
  background: rgba(52, 199, 89, 0.1);
  color: #1e5631;
  border-radius: 8px;
  padding: 12px;
  font-size: .85em;
  display: flex;
  align-items: center;
}

.alertWrapper img, .alertSuccess img { 
  width: 28px; 
  height: 28px; 
}

.table-responsive {
  padding: 12px;
  margin: 0;
}

/*Loading*/
.modalLoading {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1050;
  width: 100%;
  height: 100%;
  overflow: hidden !important;
  outline: 0;
}

#loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
}

#loader {
  display: block;
  position: relative;
  left: 50%;
  top: 50%;
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #19232D;
  -webkit-animation: spin 2s linear infinite;
  animation: spin 2s linear infinite;
}

#loader:before {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #e74c3c;
  -webkit-animation: spin 3s linear infinite;
  animation: spin 3s linear infinite;
}

#loader:after {
  content: "";
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #f9c922;
  -webkit-animation: spin 1.5s linear infinite;
  animation: spin 1.5s linear infinite;
}

@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

/*Responsividade*/
@media (max-width: 768px) {
  .template-layout main.content {
    padding: 12px 12px 90px;
  }

  .template-sidebar-fixed {
    padding-right: 0;
  }

  .btn {
    font-size: 12px;
  }

  .swal-text {
    font-size: 12px !important;
  }

  .swal-title {
    font-size: 15px;
  }

  .alertWrapper, .alertSuccess {
    font-size: 11px;
  }

  .template-layout h1, .template-layout h4 {
    font-size: 16px !important;
  }

  .template-sidebar-fixed {
    display: none;
  }

  .btn-date-selector, .btn-date-selector span {
    font-size: 15px !important;
  }

  .modal-title {
    font-size: 14px;
  }
}
