/* ./templates/static/base/css/style.css */

/* --- FONTS --- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@500;600;700&display=swap');

/* --- SETUPS --- */

:root {
  /* general color */
  --white-color: rgb(245, 245, 245);
  --black-color: rgb(10, 10, 10);

  /* background color */
  --main-color: #2dacc5;
  --alternative-color: #1d2b41;
  --diferential-color: #171f36;
  --light-bg-color: #929cb9;
  --dark-bg-color: #080b12;

  /* text color */
  --light-color: rgb(211, 211, 211);
  --dark-color: rgb(40, 40, 40);
  --light-text-color: rgb(245, 245, 245);
  --dark-text-color: rgb(112, 112, 112);
  --muted-text-color: rgb(197, 197, 197);

  /* effect color */
  --light-shadow-color: rgba(243, 226, 226, 0.502);
  --dark-shadow-color: rgba(9, 9, 10, 0.502);
  --gain-color: rgb(49, 191, 174);
  --loss-color: rgb(255, 87, 98);
  --gain-shadow-color: rgb(49, 191, 174, 0.5);
  --loss-shadow-color: rgb(255, 89, 99, 0.5);
  --main-shadow-color: rgb(45, 172, 197, 0.5);
  --alternative-shadow-color: rgb(31, 142, 241, 0.5);
  --diferential-shadow-color: rgb(23, 31, 54, 0.5);
  --fade-color:  rgba(0, 0, 0, 0.6);

  /* transitions */
  --tran-01: all 0.1s ease;
  --tran-02: all 0.2s ease;
  --tran-03: all 0.3s ease;
  --tran-04: all 0.4s ease;
  --tran-05: all 0.5s ease;
  --transition-speed: 0.3s;

  /* font family */
  --primary-font: 'Poppins', sans-serif;
  --secondary-font: 'Inter', sans-serif;

  /* effects */
  --border-radius: 10px;
}

/* --- GENERAL --- */

* {
  margin: 0px;
  padding: 0px;
  /* color: var(--light-text-color); */
  font-size: 16px;
  font-weight: 400;
  font-family: var(--main-font);
  scroll-behavior: smooth;
  line-height: 1.75rem;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
  background: var(--dark-bg-color);
  overflow-x: hidden;
}

header {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 8px;
}

main {
  width: 100%;
  padding: 10px;
}

form .hide {
  display: none !important;
}

input.form-control {
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  border: 1px solid #d0d5dd;
  background-color: #ffffff;
  color: #111827;
}

input.form-control:focus {
  border-color: var(--main-color);
  box-shadow: 0 0 5px var(--main-color);
  background-color: #ffffff;
  color: #111827;
}

a,
a:hover {
  cursor: pointer;
  text-decoration: none;
}

li {
  list-style-type: none;
}

input[type="date"]{
  color-scheme: dark; /* ou light */
}

/* --- SCROLLBAR --- */

::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track {
  background:var(--white); 
} 
::-webkit-scrollbar-thumb {
  background: var(--light-bg-color); 
}  /* o no canto inferior direito */

/* --- EFFECTS --- */

.hide {
  display: none !important;
}

.mw-1200 {
  max-width: 1200px;
}

.mw-1800 {
  max-width: 1800px;
}

.hide-scroll {
  scrollbar-width: none; /* Para navegadores como Firefox */
  -ms-overflow-style: none; /* Para Internet Explorer */
}
.hide-scroll::-webkit-scrollbar {
  display: none; /* Para navegadores baseados em WebKit */
}

/* --- COLORS --- */

.bg-dark-color {
  background-color: var(--dark-color);
}

.bg-light-color {
  background-color: var(--light-color);
}

.text-bold {
  font-weight: bold;
}

.text-dark-color {
  color: var(--dark-color);
}

.text-light-color {
  color: var(--light-color);
}

.text-gain-color {
  color: var(--gain-color);
}

.text-loss-color {
  color: var(--loss-color);
}

/* --- LAYOUTS --- */

.scroll-container {
  overflow-x: auto;
  white-space: nowrap;
  /* cursor: grab; */
  -webkit-overflow-scrolling: touch;  /* Rolagem suave em dispositivos móveis */
  scrollbar-width: none;  /* Oculta barra de rolagem no Firefox */
  scroll-behavior: smooth;
  position: relative;
}
.scroll-container:active {
  cursor: grabbing;
}

.section-title {
  font-size: 4rem;
  font-weight: 600;
  color: var(--light-color);
  text-transform: capitalize;
  margin-bottom: 2rem;
}

.section-subtitle {
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--light-color);
  font-family: var(--alternative-font);
  max-width: 40%;
  margin: auto;
  margin-bottom: 1.5rem;
}

#section_back {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: left;
  width: 100%;
}
#section_back a {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: left;
  font-size: 2rem !important;
  color: var(--alternative-color);
  cursor: pointer;
}
#section_back a:hover {
  color: var(--alternative-color);
}
#section_back span {
  font-size: 2rem;
  color: var(--alternative-color);
}

.toast {
  position: relative;
  opacity: 0.95;
}

.toast-body {
  font-size: 0.95rem;
  font-weight: 500;
}

.toast.bg-success {
  background-color: #28a745 !important;
}

.toast.bg-error,
.toast.bg-danger {
  background-color: #dc3545 !important;
}

.toast.bg-warning {
  background-color: #ffc107 !important;
  color: #000;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 5px; /* ou 3px, ajuste como preferir */
  background: rgba(255,255,255,0.3);
  overflow: hidden;
}

.toast.bg-success .toast-progress {
  background: #388e3c;
}

.toast.bg-danger .toast-progress {
  background: #d32f2f;
}

.toast.bg-warning .toast-progress {
  background: #ffa000;
}

.toast.bg-info .toast-progress {
  background: #0288d1;
}

.toast-progress-bar {
  height: 100%;
  background: rgba(255,255,255,0.7);
  width: 100%;
  transition: width linear;
}

.btn_add {
  padding: 10px;
  font-size: 32px;
  color: var(--light-color);
  background-color: var(--gain-color);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: var(--tran-02);
}
.btn_add:hover {
  background-color: var(--gain-shadow-color);
}

.btn_remove {
  padding: 10px;
  font-size: 32px;
  color: var(--light-color);
  background-color: var(--loss-color);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: var(--tran-02);
}
.btn_remove:hover {
  background-color: var(--loss-shadow-color);
}

.btn_filter {
  padding: 10px;
  font-size: 32px;
  color: var(--light-color);
  background-color: var(--diferential-color);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: var(--tran-02);
}
.btn_filter:hover {
  background-color: var(--diferential-shadow-color);
}

.social-btn {
  padding: 0.6rem 1.2rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--muted-text-color);
  background-color: transparent;
  color: var(--light-text-color);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease-in-out;
}

.social-btn:hover {
  background-color: var(--main-color);
  border-color: var(--main-color);
  color: #fff;
}

.custom-fieldset {
  max-width: 768px;
  border: 2px solid var(--diferential-color, #32416B); /* cor principal */
  border-radius: 8px;
  padding: 24px 16px 16px 16px;
  position: relative;
  margin-bottom: 2rem;
  transition: box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(50, 65, 107, 0.08);
}
.custom-fieldset:focus-within {
  box-shadow: 0 0 0 2px var(--main-color, #38BDF8); /* cor de destaque */
  border-color: var(--main-color, #38BDF8);
}

.custom-legend {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--main-color);
  padding: 0 10px;
  border-radius: 4px;
  position: absolute;
  top: -0.9em;
  left: 16px;
  /* Efeito “flutuando” */
  z-index: 1;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.dashboard-container {
  display: flex;
  width: 100%;
  min-height: 100vh;
  position: relative;
}

.section-sidebar {
  width: 260px;
  height: 100vh;
  position: fixed;
  left: -260px;
  top: 0px;
  background-color: var(--dark-bg-color);
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-speed) ease;
  z-index: 1000;
}
.section-sidebar.show {
  width: 260px;
  height: 100vh;
  position: fixed;
  left: 0px;
  top: 0px;
  background-color: var(--dark-bg-color);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-speed) ease;
  z-index: 1000;
}

.sidebar-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--dark-color);
}

.logo-container {
  display: flex;
  align-items: center;
}

.logo-icon {
  font-size: 2rem;
  color: var(--main-color);
  margin-right: 0.5rem;
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--light-text-color);
  margin: 0;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-item {
  margin-bottom: 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  color: var(--light-text-color);
  text-decoration: none;
  transition: all var(--transition-speed) ease;
}

.nav-link:hover {
  background-color: rgba(67, 97, 238, 0.1);
  color: var(--main-color);
}

.nav-item.active .nav-link {
  background-color: rgba(67, 97, 238, 0.1);
  color: var(--main-color);
  border-left: 3px solid var(--main-color);
}

.nav-link .material-symbols-outlined {
  margin-right: 1rem;
  font-size: 1.25rem;
}

.sidebar-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--dark-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.user-info {
  display: flex;
  align-items: center;
}

.user-info .material-symbols-outlined {
  margin-right: 0.5rem;
  font-size: 1.5rem;
}

.user-name {
  color: var(--light-color);
  font-size: 0.9rem;
  font-weight: 500;
}

.logout-link {
  color: var(--light-color);
  cursor: pointer;
  transition: color var(--transition-speed) ease;
}

.logout-link span:hover{
  color: var(--loss-color);
}

.btn-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--light-text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color var(--transition-speed) ease;
}

.btn-toggle:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.btn-toggle .material-symbols-outlined {
  font-size: 1.5rem;
}

.section-content {
  flex: 1;
  width: 100%;
  margin-left: 0px;
  transition: margin-left var(--transition-speed) ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.section-sidebar.show ~ .section-content {
  flex: 1;
  width: calc(100%-260px);
  margin-left: 260px;
  transition: margin-left var(--transition-speed) ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content-header {
  background-color: var(--dark-bg-color);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 900;
}

.page-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.header-actions {
  display: flex;
  align-items: center;
}

.search-container {
  position: relative;
  margin-right: 1.5rem;
}

.search-input {
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 1px solid var(--light-color);
  border-radius: 50px;
  font-size: 0.9rem;
  color: var(--dark-color);
  width: 200px;
  transition: all var(--transition-speed) ease;
}

.search-input:focus {
  outline: none;
  width: 250px;
  border-color: var(--light-color);
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--dark-color);
  font-size: 1.25rem;
}

.notifications {
  position: relative;
  cursor: pointer;
}

.notifications .material-symbols-outlined {
  font-size: 1.5rem;
  color: var(--light-color);
}

.notifications .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: var(--loss-color);
  color: white;
  font-size: 0.7rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.content-body {
  flex: 1;
  padding: 10px;
  background-color: var(--dark-bg-color);
}

.card-plan {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.card-plan .card-header {
    background-color: var(--main-shadow-color);
    border-bottom: 1px solid var(--border-color);
    border-radius: 10px 10px 0 0 !important;
    padding: 1rem 1.5rem;
}

.card-plan .card-body {
    background-color: var(--dark-color);
    padding: 1.5rem;
}

.card {
  border: 1px solid var(--diferential-color);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  /* box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3); */
  margin-bottom: 1.5rem;
  background-color: var(--diferential-color);
  transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  /* box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3); */
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--light-color);
  padding: 1rem 1.5rem;
}

.card-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.welcome-card {
  background-color: var(--dark-shadow-color);
  color: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.welcome-card h2 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.welcome-card p {
  opacity: 0.9;
  margin-bottom: 0;
}

.stat-card .card-body {
  display: flex;
  align-items: center;
  padding: 1.5rem;
  background-color: var(--diferential-color);
  border-radius: 5px;
}

.stat-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: rgba(67, 97, 238, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
}

.stat-icon .material-symbols-outlined {
  font-size: 2rem;
  color: var(--main-color);
}

.stat-info {
  flex: 1;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.stat-label {
  color: var(--light-color);
  margin: 0;
}

.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--light-color);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(67, 97, 238, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
}

.activity-icon .material-symbols-outlined {
  font-size: 1.25rem;
  color: var(--main-color);
}

.activity-details {
  flex: 1;
}

.activity-text {
  margin: 0;
  font-weight: 500;
}

.activity-time {
  color: var(--light-text-color);
  font-size: 0.85rem;
  margin: 0;
}

.task-list {
  display: flex;
  flex-direction: column;
}

.task-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--light-color);
}

.task-item:last-child {
  border-bottom: none;
}

.form-check-input:checked + .form-check-label {
  text-decoration: line-through;
  color: var(--dark-text-color);
}

.message-bubble {
  max-width: 80%;
  border-radius: 10px;
}

.message-support {
  background-color: rgba(24, 44, 78, 0.9);
}

.message-user {
  background-color: rgba(45, 172, 197, 0.9);
}

/* --- BOOTSTRAP --- */

/* form */
.form-control,
.form-select,
.form-check-input,
.input-group-text {
  border-radius: var(--border-radius);
  border: 1px solid #d0d5dd;
  background-color: #ffffff;
  color: #111827;
  transition: var(--tran-02);
}

/* padrao visual global dos campos bootstrap */
.form-control,
.form-select,
.form-check-input,
.input-group-text,
.modal .form-control,
.modal .form-select,
.modal .input-group-text {
  background-color: #ffffff !important;
  color: #111827 !important;
  border-color: #d0d5dd !important;
}

.form-control::placeholder {
  color: #6b7280;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--main-color) !important;
  box-shadow: 0 0 0 0.2rem rgba(45, 172, 197, 0.25) !important;
  background-color: #ffffff;
  color: #111827;
}

.form-select {
  color: #111827;
}

.form-select option {
  background: #ffffff;
  color: #111827;
}

textarea.form-control {
  min-height: 110px;
  resize: vertical;
}

/* btn */
/* .btn,
.btn-close:focus,
.btn:focus,
.btn-close:active,
.btn:active {
  outline: none !important;
  box-shadow: none !important;
}
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:visited {
  background-color: var(--main-color) !important;
  border-color: var(--main-color) !important;
  border-color: var(--main-color) !important;
} */

/* modal */
.modal-title {
  color: var(--alternative-color) !important;
}

.modal-footer {
  border-top: none !important;
}

.modal-body p {
  font-size: 1rem !important;
  color: var(--dark-color) !important;
}

.modal-body strong {
  color: var(--dark-color) !important;
}

.form-label {
  color: var(--dark-color) !important;
  font-weight: 500;
}

/* nav */
.pagination {
  margin-bottom: 0;
} /* Remove a margem padrão da lista para melhor controle */

.page-link {
  background-color: var(--diferential-color);
  color: var(--light-color);
  border: 1px solid var(--alternative-color);
  transition: background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
  margin: 0 2px; /* Adiciona um pequeno espaçamento entre os botões */
  border-radius: 6px !important; /* Arredonda todos os cantos */
} /* Estilo base para cada link da paginação */

.page-link:hover,
.page-link:focus {
  background-color: var(--alternative-color);
  color: var(--white-color);
  border-color: var(--main-color);
  box-shadow: 0 0 8px var(--main-shadow-color);
  z-index: 2; /* Garante que a sombra não seja cortada pelo item vizinho */
} /* Efeito ao passar o mouse ou focar (via teclado) em um link */

.page-item.active .page-link {
  background-color: var(--main-color);
  color: var(--white-color);
  border-color: var(--main-color);
  box-shadow: 0 0 12px var(--main-shadow-color);
  z-index: 3;
} /* Estilo para o item ATIVO (página atual) */

.page-item.disabled .page-link {
  background-color: transparent; /* Fundo mais sutil para desativado */
  color: var(--dark-text-color);
  border-color: var(--diferential-color);
  pointer-events: none; /* Garante que não é clicável */
} /* Estilo para itens DESATIVADOS (primeiro/anterior na primeira pág, etc.) */

.page-link:focus {
  box-shadow: 0 0 8px var(--main-shadow-color);
} /* Sobrescreve a cor do foco padrão do Bootstrap para manter a consistência */

/* --

RESPONSIVE DESIGN - MEDIA QUERIES

Media Types
-----------
1 - screen
2 - portrait
3 - landscape
4 - print
5 - pdf

Typical Device Breakpoints
--------------------------
Pequenas telas: até 600px
Celular: de 600px até 768px
Tablet: de 768px até 992px
Desktop: de 992px até 1200px
Grandes telas: acima de 1200px

Bootstrap Device Breakpoints
----------------------------
xs: 0,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px,
xxl: 1400px

-- */

@media (max-width: 576px) {
  .custom-fieldset {
    padding: 20px 8px 12px 8px;
  }
  .custom-legend {
    left: 8px;
    font-size: 1rem;
  }
}