/* AMIGOS DA SOGRA - TEMA PERSONALIZADO */

:root {
  --amigos-bg: #101014;
  --amigos-card: #1c1c22;
  --amigos-red: #dc2626;
  --amigos-hover: #ef4444;
}

body {
  background-color: var(--amigos-bg);
  color: #f5f5f5;
}

.card,
.modal-content,
.dropdown-menu {
  background-color: var(--amigos-card);
  color: #f5f5f5;
  border: 1px solid #35353d;
  border-radius: 14px;
}

.btn-primary,
.btn-danger {
  background: linear-gradient(135deg, #dc2626, #991b1b);
  border-color: #dc2626;
  border-radius: 9px;
}

.btn-primary:hover,
.btn-danger:hover {
  background: #ef4444;
  border-color: #ef4444;
}

a {
  color: #ef4444;
}

a:hover {
  color: #f87171;
}

.form-control,
.form-select {
  background-color: #24242b;
  color: #ffffff;
  border-color: #44444e;
  border-radius: 9px;
}

.form-control:focus,
.form-select:focus {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,.15);
}

.card {
  transition: transform .2s, box-shadow .2s;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

/* AMIGOS DA SOGRA - CORRECOES VISUAIS */

header,
.navbar,
.navbar-light,
.card-header {
  background-color: #1c1c22 !important;
  color: #ffffff !important;
}

.card-header,
.card-header *,
.navbar-brand,
.navbar-brand *,
.navbar .nav-link {
  color: #ffffff !important;
}

.card-header {
  border-bottom: 1px solid #38383f !important;
}

.card-body,
.card-footer {
  background-color: #1c1c22;
  color: #f5f5f5;
}

.card-body p,
.card-body h1,
.card-body h2,
.card-body h3,
.card-body h4 {
  color: #f5f5f5;
}

.navbar-toggler {
  border-color: #555 !important;
}

.navbar-toggler-icon {
  filter: invert(1);
}


/* AMIGOS DA SOGRA — CLIENT AREA V2 */

:root {
  --amigos-red: #dc2626;
  --amigos-red-hover: #ef4444;
  --amigos-dark: #101014;
  --amigos-surface: #1c1c22;
  --amigos-border: #34343c;
}

body {
  background: var(--amigos-dark);
  color: #f5f5f5;
}

.content-block,
.card,
.modal-content {
  background: var(--amigos-surface);
  color: #f5f5f5;
  border: 1px solid var(--amigos-border);
  border-radius: 14px;
}

.card {
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  transition: transform .2s, border-color .2s;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--amigos-red);
}

.btn-primary {
  background: var(--amigos-red);
  border-color: var(--amigos-red);
  border-radius: 10px;
}

.btn-primary:hover {
  background: var(--amigos-red-hover);
  border-color: var(--amigos-red-hover);
}

.nav-link.active,
.nav-link:hover {
  color: var(--amigos-red-hover);
}

.form-control,
.form-select {
  background-color: #24242c;
  color: #fff;
  border: 1px solid #41414b;
  border-radius: 10px;
}

.form-control:focus,
.form-select:focus {
  background-color: #24242c;
  color: #fff;
  border-color: var(--amigos-red);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, .15);
}

@media (max-width: 768px) {
  .content-block {
    padding: 16px;
  }

  .card {
    margin-bottom: 14px;
  }
}

/* AMIGOS DA SOGRA — MOBILE FIX V3 */

/* Melhor leitura das mensagens */
.alert-info {
  background: #20202a !important;
  border: 1px solid #dc2626 !important;
  color: #f5f5f5 !important;
}

.alert-info a {
  color: #f87171 !important;
}

/* Cartões */
.card-header {
  background: #24242c;
  color: #fff;
  border-bottom: 1px solid #383842;
}

.card-body,
.card-text {
  color: #e5e5e5;
}

/* Ligações */
.content-block a:not(.btn) {
  color: #f87171;
}

/* Adaptação ao telemóvel */
@media (max-width: 767.98px) {

  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .container,
  .container-fluid {
    width: 100%;
    max-width: 100%;
    padding-left: 12px;
    padding-right: 12px;
  }

  .navbar {
    padding: 10px 12px;
  }

  .navbar-brand {
    max-width: 65%;
    overflow: hidden;
  }

  .navbar-brand img {
    max-width: 100%;
    height: auto;
    max-height: 42px;
  }

  .content-block {
    width: 100%;
    padding: 14px;
  }

  .card {
    width: 100%;
  }

  .row {
    --bs-gutter-x: 16px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }
}

/* AMIGOS DA SOGRA — RESPONSIVE V4 */

@media (max-width: 767.98px) {

  /* Cabeçalho adaptado ao telemóvel */
  header .navbar .container-fluid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  header .navbar-brand {
    max-width: calc(100% - 65px);
    margin-right: 0;
    font-size: 1rem;
  }

  header .navbar-toggler {
    display: block;
    margin-left: auto;
    border: 1px solid #dc2626;
    border-radius: 10px;
  }

  /* Menu recolhido por defeito */
  header .navbar-collapse:not(.show) {
    display: none !important;
  }

  header .navbar-collapse.show {
    display: block !important;
    flex-basis: 100%;
    width: 100%;
    padding: 12px;
    background: #1c1c22;
    border: 1px solid #34343c;
    border-radius: 12px;
  }

  header .navbar-collapse .navbar-nav {
    align-items: stretch !important;
  }

  header .navbar-collapse .nav-link {
    padding: 10px 12px;
  }

  /* Conteúdo a ocupar a largura disponível */
  body > .container,
  body > .container > .container {
    width: 100%;
    max-width: 100%;
  }

  #wrapper,
  .content-block {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .content-block .row > [class*="col-"] {
    min-width: 0;
  }
}

/* AMIGOS DA SOGRA - RODAPE */

#footer {
    color: #b8b8c2 !important;
    text-align: center;
    padding: 24px 12px;
    margin-top: 30px !important;
    border-top: 1px solid #34343c;
    font-size: 13px;
    line-height: 1.8;
}

#footer.text-muted,
#footer .text-muted,
#footer span {
    color: #b8b8c2 !important;
}

#footer a {
    color: #ef4444 !important;
    text-decoration: none;
}

#footer a:hover {
    color: #f87171 !important;
    text-decoration: underline;
}

@media (max-width: 767.98px) {
    #footer {
        padding: 20px 10px;
        font-size: 12px;
    }
}


/* AMIGOS DA SOGRA - ANDROID RESPONSIVO */

@media (hover: none) and (pointer: coarse) and (max-width: 1200px) {

    .navbar.navbar-expand-md {
        flex-wrap: wrap !important;
    }

    .navbar.navbar-expand-md .navbar-toggler {
        display: block !important;
        margin-left: auto;
    }

    .navbar.navbar-expand-md .navbar-collapse {
        flex-basis: 100% !important;
        flex-grow: 1;
    }

    .navbar.navbar-expand-md .navbar-collapse:not(.show) {
        display: none !important;
    }

    .navbar.navbar-expand-md .navbar-collapse.show {
        display: block !important;
        width: 100%;
    }

    .navbar.navbar-expand-md .navbar-nav {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .dashboard .row > .col-md-6 {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .container,
    .container-fluid {
        max-width: 100% !important;
    }

}


/* AMIGOS DA SOGRA - BOTAO DE REGISTO */
.alert-info .btn-primary,
.alert-info .btn-primary:hover {
    color: #ffffff !important;
    font-weight: 600;
}

/* AMIGOS DA SOGRA - CABECALHO MOBILE COMPACTO */

@media (max-width: 767.98px) {

  header .navbar {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }

  header .navbar .container-fluid {
    min-height: 0 !important;
  }

  header .navbar-brand {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  header .navbar-brand img {
    max-height: 42px !important;
    width: auto !important;
    object-fit: contain;
  }

  header .navbar-toggler {
    padding: 6px 10px !important;
    margin: 0 !important;
  }

}

/* COMUNIDADE AMIGOS DA SOGRA - CARTOES MODERNOS */

.dashboard .card {
  background: #1c1c22;
  border: 1px solid #35353d;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}

.dashboard .card-header {
  border-bottom: 1px solid #383842;
  padding: 16px 18px;
  font-weight: 700;
}

.dashboard .card-body {
  padding: 18px;
}

.dashboard .card .btn {
  border-radius: 9px;
  padding: 8px 14px;
}

@media (max-width: 767.98px) {
  .dashboard .card {
    margin-bottom: 14px !important;
  }
}

/* COMUNIDADE AMIGOS DA SOGRA - ICONES DOS CARTOES */

.dashboard .card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dashboard .card-header::before {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(220,38,38,.12);
  color: #ef4444;
  font-size: 21px;
  font-weight: 600;
}

.dashboard .row > div:nth-child(1) > .card > .card-header::before {
  content: "\263A";
}

.dashboard .row > div:nth-child(2) > .card > .card-header::before {
  content: "\1F6D2";
}

.dashboard .row > div:nth-child(3) > .card > .card-header::before {
  content: "\2709";
}

.dashboard .row > div:nth-child(4) > .card > .card-header::before {
  content: "?";
}


/* AMIGOS DA SOGRA - ICONES SVG DEFINITIVOS */

.dashboard .card-header::before {
  content: "" !important;
  background-color: rgba(220,38,38,.12) !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 22px 22px !important;
}

/* PERFIL */
.dashboard .row > div:nth-child(1) > .card > .card-header::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M5 21v-2a7 7 0 0 1 14 0v2'/%3E%3C/svg%3E") !important;
}

/* ENCOMENDAR */
.dashboard .row > div:nth-child(2) > .card > .card-header::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.5 13h12l3-9H6'/%3E%3C/svg%3E") !important;
}

/* NOTICIAS */
.dashboard .row > div:nth-child(3) > .card > .card-header::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M7 7h4v4H7zM15 7h2M15 11h2M7 15h10M7 18h10'/%3E%3C/svg%3E") !important;
}

/* CENTRO DE AJUDA */
.dashboard .row > div:nth-child(4) > .card > .card-header::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23ef4444' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 14v-3a9 9 0 0 1 18 0v3'/%3E%3Crect x='2' y='13' width='4' height='7' rx='2'/%3E%3Crect x='18' y='13' width='4' height='7' rx='2'/%3E%3Cpath d='M20 20a5 5 0 0 1-5 3h-3'/%3E%3C/svg%3E") !important;
}


/* AMIGOS DA SOGRA - BOTOES DOS CARTOES */

.dashboard .card .card-body .btn {
  background: linear-gradient(135deg, #dc2626, #991b1b) !important;
  border: 1px solid #dc2626 !important;
  color: #ffffff !important;
  border-radius: 11px !important;
  padding: 10px 18px !important;
  font-weight: 600;
  transition: background .2s ease,
              transform .2s ease,
              box-shadow .2s ease;
}

.dashboard .card .card-body .btn:hover {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(220,38,38,.25);
}

.dashboard .card .card-body .btn:active {
  transform: scale(.97);
}


/* AMIGOS DA SOGRA - AJUSTES MOBILE */

@media (max-width: 767.98px) {

  /* Cartoes mais compactos */
  .dashboard .card {
    margin-bottom: 12px !important;
  }

  .dashboard .card-header {
    padding: 12px 14px !important;
  }

  .dashboard .card-body {
    padding: 14px !important;
  }

  /* Icones ligeiramente menores */
  .dashboard .card-header::before {
    width: 32px !important;
    height: 32px !important;
    background-size: 20px 20px !important;
  }

  /* Espaco para o botao flutuante */
  body.dashboard {
    padding-bottom: 65px;
  }

  /* Botao Topo */
  #to-top,
  #back-to-top,
  .back-to-top,
  .scroll-to-top {
    position: fixed !important;
    right: 12px !important;
    bottom: 16px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
    z-index: 100 !important;
  }
}

