@import url("https://fonts.googleapis.com/css?family=Poppins:400,500,600,700&display=swap");

@font-face {
  font-family: "opensans";
  src: url("../fonts/OpenSans-Regular.ttf");
}

@font-face {
  font-family: "montse";
  src: url("../fonts/MONTSERRAT-REGULAR.TTF");
}

@font-face {
  font-family: "roboto";
  src: url(../fonts/Roboto-Regular.ttf);
}

/* ==========================================================================
   1. RESET GLOBAL E VARIÁVEIS UNIFICADAS
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* Removido o color: #888 !important que estava a destruir a hierarquia */
}

:root {
  /* Variáveis Globais Antigas */
  --main-color: #27AE60;
  --main-light: #BEE7CF;
  --accent-light: #004080;
  
  /* Variáveis Injetadas para o Formulário de Perfil */
  --primary: #fff;
  --secondary: #f88206;
  --profile-main-color: #fe940d;
  --text: #888;
  --errorColor: red;
  --sucessColor: green;
  --stepNumber: 6; /* CRUCIAL: Sem isto o JS e o layout calc() falham */
  --containerWidth: 600px;
  --bgColor: #efefef;
  --inputBorderColor: #f88206;
  --box-bg: #004080;
}

body {
  background: #efefef;
  color: #333; /* Cor base aplicada de forma segura */
  font-family: "opensans", sans-serif;
}

body.activeMX {
  overflow-y: hidden;
}

a {
  color: #333;
  text-decoration: none;
}

h3 {
  font-size: 1.2rem !important;
}

.flex {
  display: flex;
  align-items: center;
}

/* ==========================================================================
   2. CABEÇALHO, NAVEGAÇÃO E PESQUISA
   ========================================================================== */
header {
  background-color: #fff;
  padding: 2rem 0.6rem 5rem 0.6rem;
}

header nav {
  display: flex;
  justify-content: space-between;
  align-content: center;
}

nav p {
  font-weight: 500;
  color: #fff;
}

.progress-label-left { float: left; margin-right: 0.5em; line-height: 1em; }
.progress-label-right { float: right; margin-left: 0.3em; line-height: 1em; }
.star-light { color: #e9ecef !important; }

.radius {
  padding: 10px;
  background: #eee;
  border-radius: 10px;
  display: flex;
  flex-wrap: nowrap;
}

.radius label {
  width: 100%;
  margin-left: 10px;
}

.search {
  margin: 0.6rem 0rem 0rem 0rem;
  display: flex;
  background: transparent;
  align-items: center;
  padding: .8rem 0rem;
  border-radius: 10px;
  position: relative;
}

.search span {
  color: #a4a4a4;
  font-size: 1.2rem;
  margin-right: .6rem;
  position: absolute;
  left: 15px;
  cursor: pointer;
}

.form-control:focus {
  background-color: transparent;
  border-bottom: 2px solid #f88206;
  border-radius: 0;
}

.hr2 {
  border: 0;
  height: 1px;
  background: #ddd;
  width: 100%;
  margin: 20px 0 25px 0;
  padding: 0;
}

.search input {
  display: block;
  flex: 1;
  background: #ececec;
  border: none; 
  outline: none; 
  box-shadow: none !important;
  padding-left: 44px;
}

.form-control::placeholder {
  color: #a4a4a4;
  opacity: 1;
}

nav .img {
  height: 45px;
  width: 100%;
  background-size: cover;
  background-repeat: no-repeat;
}

/* ==========================================================================
   3. ESTRUTURA PRINCIPAL E CATEGORIAS (MAIN)
   ========================================================================== */
main {
  width: 100%;
  background: #efefef;
  border-radius: 35px 35px 0px 0px;
  position: relative;
  /* top: -3rem; */
}

.section-wrapper {
  background: #fff;
  box-shadow: 3px 3px 30px rgba(0, 0, 0, 0.1);
  padding: 1rem;
}

.space-padding {
  margin-top: 1rem !important;
}

.flex-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem;
}

.section-wrapper h2 {
  font-size: 1em;
  color: #333;
  font-weight: bold;
}

.section-wrapper h2+a {
  font-size: 1rem;
  color: var(--main-color);
  font-weight: bold;
}

.items {
  width: 100%;
  margin: auto;
  margin-top: 1rem;
  display: flex;
  overflow-x: auto;
  justify-content: space-between;
}

.items::-webkit-scrollbar { width: 0rem !important; }
.items::-webkit-scrollbar-track { width: 0; }

.items a .item {
  width: 110px;
  height: 110px;
  margin-right: 1.5rem;
  box-shadow: 0px 0px 4px #b5b3b3;
  margin: 4px;
  padding: 10px;
  border-radius: 10px;
}

.bonga h4 {
  margin: 10px;
  font-size: 1em;
  color: #888;
}

.items a .bonga {
  min-width: 164px; 
  height: 180px;
  margin-right: 1.5rem;
  box-shadow: 0px 0px 4px #b5b3b3;
  margin: 4px;
  padding: 0px;
  border-radius: 10px;
  overflow: hidden;
}

.item h4 {
  font-size: .75rem;
  text-align: center;
  margin-top: .7rem;
  font-weight: 100;
}

.item-img {
  width: 100%;
  height: 40px;
  border-radius: 20px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.bonga .item-img {
  height: 120px;
  border-radius: 0px;
  background-size: cover;
}

/* ==========================================================================
   4. MODAIS E MENUS FLUTUANTES (KWAPANGULO)
   ========================================================================== */
.kwapangulo, .kwapangulo1 {
  height: 100vh; 
  width: 100%; 
  padding: 0rem 0.6rem 5rem 0.6rem; 
  background: #fff; 
  position: absolute; 
  top: 70%; 
  left: 0; 
  z-index: 9999; 
  overflow-y: scroll; 
  display: none;
}

.kwapangulo1.active, .kwapangulo.active {
  display: block!important;
}

.hadow97 {
  margin-bottom: 0;
  font-weight: 100;
  color: #f88206 !important; 
  padding: 5px; 
  cursor: pointer;
  display: none;
}

.hadow97.active {
  display: block!important;
}

/* ==========================================================================
   5. BANNERS E PROMOÇÕES
   ========================================================================== */
.promo {
  margin-bottom: 1.4rem;
}

.popular-item {
  box-shadow: 0px 0px 4px #b5b3b3;
  margin: 10px;
}

.promo-item {
  border-radius: 20px;
  display: flex;
  background-color: var(--main-light);
  min-width: 340px !important;
  width: 100% !important;
  padding: 1.3rem 1rem;
  align-items: center;
  margin-left: 1rem; 
  margin-right: 1rem;
  justify-content: space-around;
}

.promo-info h3 { font-size: 1.2rem !important; }

.promo-item .promo-btn a {
  background-color: #f88206;
  padding: 14px 20px;
  border-radius: 40px;
  color: #2b2b2b !important;
}

.promo-item:last-child { background-color: var(--accent-light); }
.promo-item:last-child h3 { color: orange; }
.promo-item:last-child a { color: orange; }

.promo-item h3 {
  font-size: 1.4rem;
  color: var(--main-color);
}

.promo-item p {
  font-size: .85rem;
  margin: .5rem 0rem .8rem 0rem;
  font-weight: 500;
}

/* ==========================================================================
   6. ESTRUTURA DO FORMULÁRIO DE PERFIL (RESOLUÇÃO DO CONFLITO)
   O encapsulamento na div .bamba impede vazamento de CSS.
   ========================================================================== */
.bamba {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bgColor);
  font-family: "Poppins", sans-serif;
}

.lgcontainer {
  width: var(--containerWidth);
  background: transparent;
  text-align: center;
  border-radius: 5px;
  padding: 50px 35px 10px 35px;
}

.lgcontainer header {
  font-size: 35px;
  font-weight: 600;
  color: var(--secondary);
}

.lgcontainer .form-outer {
  width: 100%;
  overflow: hidden;
}

.lgcontainer .form-outer form {
  display: flex;
  width: calc(100% * var(--stepNumber));
}

.form-outer form .page {
  width: calc(100% / var(--stepNumber));
  transition: margin-left 0.3s ease-in-out;
}

.form-outer form .page .title {
  text-align: left;
  font-size: 25px;
  font-weight: 500;
}

.form-outer form .page .field {
  width: 100%;
  height: 45px;
  margin: 45px 0 0 0;
  display: flex;
  position: relative;
}

form .page .field .label {
  position: absolute;
  top: -30px;
  font-weight: 500;
  color: var(--text);
}

form .page .field input, textarea {
  box-sizing: border-box;
  height: 100%;
  width: 100%;
  border: none;
  border-bottom: 2px solid var(--secondary);
  padding-left: 15px;
  margin: 0 1px;
  font-size: 18px;
  transition: border-color 150ms ease;
  background: transparent;
  color: #888;
}

form .page .field input.invalid-input, textarea.invalid-input {
  border-color: var(--errorColor);
}

form .page .field select {
  width: 100%;
  padding-left: 10px;
  font-size: 17px;
  color: #888;
  font-weight: 500;
  border: 1px solid var(--inputBorderColor);
}

form .page .field button, form .page .field input.submit, .piggi {
  width: 100%;
  height: calc(100% + 5px);
  border: none;
  background: var(--secondary);
  margin-top: -20px;
  border-radius: 5px;
  color: #fff !important;
  cursor: pointer;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 1px;
  transition: 0.5s ease;
  box-shadow: unset;
}

form .page .field button:hover {
  background: #000;
}

form .page .btns button { margin-top: -20px !important; }
form .page .btns button.prev { margin-right: 3px; font-size: 17px; }
form .page .btns button.next { margin-left: 3px; }

/* Barra de Progresso do Perfil */
.lgcontainer .progress-bar {
  display: flex;
  margin: 40px 0;
  user-select: none;
}

.lgcontainer .progress-bar .step {
  text-align: center;
  width: 100%;
  position: relative;
}

.lgcontainer .progress-bar .step p {
  font-weight: 500;
  font-size: 18px;
  color: #000;
  margin-bottom: 8px;
}

.progress-bar .step .bullet {
  height: 25px;
  width: 25px;
  border: 2px solid #000;
  display: inline-block;
  border-radius: 50%;
  position: relative;
  transition: 0.2s;
  font-weight: 500;
  font-size: 17px;
  line-height: 25px;
}

.progress-bar .step .bullet.active {
  border-color: var(--secondary);
  background: var(--secondary);
}

.progress-bar .step .bullet span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.progress-bar .step .bullet.active span { display: none; }

.progress-bar .step .bullet:before,
.progress-bar .step .bullet:after {
  position: absolute;
  content: "";
  bottom: 11px;
  right: -51px;
  height: 3px;
  width: 44px;
  background: #262626;
}

.progress-bar .step .bullet.active:after {
  background: var(--secondary);
  transform: scaleX(0);
  transform-origin: left;
  animation: animate 0.3s linear forwards;
}

@keyframes animate {
  100% { transform: scaleX(1); }
}

.progress-bar .step:last-child .bullet:before,
.progress-bar .step:last-child .bullet:after {
  display: none;
}

.progress-bar .step p.active {
  color: var(--secondary);
  transition: 0.2s linear;
}

.progress-bar .step .check {
  position: absolute;
  left: 50%;
  top: 70%;
  font-size: 15px;
  transform: translate(-50%, -50%);
  display: none;
}

.progress-bar .step .check.active {
  display: block;
  color: #fff;
}

/* Componentes Adicionais do Perfil (Upload, Erros, Modal) */
.avatar-upload {
  position: relative;
  max-width: 135px;
  margin: 10px auto;
}

.avatar-upload .avatar-edit {
  position: absolute;
  right: 12px;
  z-index: 1;
  top: 10px;
}

.avatar-upload .avatar-edit input {
  display: none;
}

.avatar-upload .avatar-edit input + label {
  display: inline-block;
  width: 34px;
  height: 34px;
  border-radius: 100%;
  background: #FFFFFF;
  border: 1px solid transparent;
  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.avatar-upload .avatar-preview {
  width: 112px;
  height: 112px;
  position: relative;
  border-radius: 100%;
  border: 6px solid #F8F8F8;
  box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.1);
}

.avatar-upload .avatar-preview > div {
  width: 100%;
  height: 100%;
  border-radius: 100%;
  background-size: cover;
  background-position: center;
}

.erro-bom {
  padding: 20px 20px 5px 20px;
  background: lightgreen;
  color: green;
  text-align: left;
  border-radius: 10px;
  display: flex;
}

.erro-invalido {
  padding: 20px 20px 5px 20px;
  background: indianred;
  color: pink;
  text-align: left;
  border-radius: 10px;
  display: flex;
}

.eliminar {
  background: transparent;
  outline: none;
  border: none;
  color: var(--secondary);
  margin-top: 20px;
  text-decoration: underline;
}

#eliminar {
  background: var(--secondary);
  color: #fff;
  margin-top: 10px;
  padding: 10px 40px;
  width: 100%;
  border-radius: 5px;
}

/* ==========================================================================
   7. MEDIA QUERIES RESPONSIVAS
   ========================================================================== */
@media screen and (max-width: 660px) {
  :root { --containerWidth: 400px; }
  .progress-bar .step p { display: none; }
  .progress-bar .step .bullet::after,
  .progress-bar .step .bullet::before { display: none; }
  .progress-bar .step .bullet { display: flex; align-items: center; justify-content: center; }
  .progress-bar .step .check { position: absolute; left: 50%; top: 50%; display: none; }
}

@media screen and (max-width: 490px) {
  :root { --containerWidth: 100%; }
  .lgcontainer { box-sizing: border-box; border-radius: 0; padding: 20px 15px; }
}

@media only screen and (max-width: 373px) {
  .items a .item { width: 102px; }
}

@media only screen and (max-width: 349px) {
  .items a .bonga { min-width: 123px; height: 182px; }
  .promo-item { min-width: 293px !important; }
  .items a .item { width: 89px; }
}


/* ==========================================================================
   DESIGN MODERNO (HOME OVERVIEW) - Adicionar ao final do app.css
   ========================================================================== */

/* Fundo da página principal */
.md-main-bg {
    background-color: #f8f9fa; /* Um cinza muito mais limpo e claro */
    min-height: 100vh;
    padding-bottom: 5rem;
}

/* Contentor Centralizado - Expansivo no Desktop */
.md-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    font-family: 'Poppins', sans-serif;
}

/* 1. HERO SECTION */
.md-hero {
    background: #ffffff;
    border-radius: 24px;
    padding: 4rem 2rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    text-align: center;
    border: 1px solid rgba(0,0,0,0.03);
}

.md-hero-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.md-hero-subtitle {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 2.5rem;
}

/* Barra de Pesquisa Estilo Airbnb */
.md-search-wrapper {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 50px;
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    border: 1px solid #f3f4f6;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.md-search-wrapper:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(248, 130, 6, 0.15);
    border-color: #f88206;
}

.md-search-icon {
    font-size: 1.2rem;
    color: #f88206;
}

.md-search-input {
    flex: 1;
    border: none;
    padding: 1rem;
    font-size: 1.1rem;
    color: #1f2937;
    background: transparent;
    outline: none;
}

.md-search-input::placeholder {
    color: #9ca3af;
}

.md-search-btn {
    background: #f88206;
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    border-radius: 40px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.md-search-btn:hover {
    background: #e07505;
}

/* 2. SECÇÕES E CABEÇALHOS */
.md-section {
    margin-bottom: 3.5rem;
}

.md-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

.md-section-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.md-link-all {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f88206;
    text-decoration: none;
    transition: opacity 0.3s;
}
.md-link-all:hover { opacity: 0.8; }

/* 3. GRELHA DE CATEGORIAS */
.md-category-grid {
    display: grid;
    /* Adaptação mágica: 2 colunas em telemóveis pequenos, até 6 no PC */
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1.2rem;
}

.md-cat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
}

.md-cat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    border-color: #f88206;
}

.md-cat-icon {
    width: 48px;
    height: 48px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 1rem;
}

.md-cat-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4b5563;
    text-align: center;
}

/* 4. GRELHA DE SERVIÇOS (Destaques) */
.md-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.md-service-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
}

.md-service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.md-service-img {
    width: 100%;
    height: 160px;
    background-size: cover;
    background-position: center;
}

.md-service-info {
    padding: 1.2rem;
}

.md-service-info h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.md-service-tag {
    font-size: 0.75rem;
    font-weight: 500;
    background: #f3f4f6;
    color: #6b7280;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
}

/* ==========================================================================
   BANNERS PROMOCIONAIS (Premium Mesh & Glass Logo)
   ========================================================================== */
.md-promo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.md-promo-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.8rem;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    overflow: hidden;
    min-height: 220px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.md-promo-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.15);
}

/* Fundos Premium Radiais (Efeito Luz 3D) */
.md-danger {
    background: radial-gradient(circle at 90% 10%, #ff6b6b 0%, #ee5253 50%, #c82333 100%);
    color: #fff;
}

.md-support {
    background: radial-gradient(circle at 90% 10%, #ffad5c 0%, #f88206 50%, #cc6600 100%);
    color: #fff;
}

/* Formas Abstratas Desfocadas no Fundo */
.md-promo-card::before {
    content: '';
    position: absolute;
    top: -20%; right: -10%;
    width: 250px; height: 250px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    filter: blur(25px);
    z-index: 1;
}

.md-promo-card::after {
    content: '';
    position: absolute;
    bottom: -20%; left: -10%;
    width: 200px; height: 200px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 50%;
    filter: blur(35px);
    z-index: 1;
}

/* Estrutura Superior (Texto na Esquerda, Logo na Direita) */
.md-promo-top-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
    margin-bottom: 2rem;
    gap: 1.5rem;
}

.md-promo-info {
    flex: 1;
}

.md-promo-info h3 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.md-promo-info p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}

/* O Logótipo ou Ícone (Efeito Vidro Fosco - Glassmorphism) */
.md-promo-logo {
    width: 75px;
    height: 75px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
    
    /* Alinhamento para centrar o ícone */
    display: flex;
    justify-content: center;
    align-items: center;

    /* Efeito de Vidro */
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 18px;
    padding: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}
/* Botão de Ação Translúcido (Fundo do Cartão) */
.md-promo-action-bar {
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 1rem 1.2rem;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.3s ease;
}

.md-promo-card:hover .md-promo-action-bar {
    background: rgba(255, 255, 255, 0.3);
}

/* Ajustes Mobile */
@media screen and (max-width: 480px) {
    .md-promo-top-wrapper {
        flex-direction: column-reverse; /* No telemóvel, o logo fica em cima e o texto em baixo */
        gap: 1rem;
    }
    .md-promo-logo {
        width: 60px;
        height: 60px;
        padding: 8px;
    }
    .md-promo-info h3 {
        font-size: 1.4rem;
    }
}

/* 6. RESPONSIVIDADE PARA TELEMÓVEIS */
@media (max-width: 768px) {
    .md-hero {
        padding: 2.5rem 1rem;
        border-radius: 16px;
    }
    .md-hero-title { font-size: 1.6rem; }
    .md-search-wrapper {
        padding: 0.3rem;
        border-radius: 16px;
        flex-direction: column;
    }
    .md-search-icon { display: none; }
    .md-search-input { width: 100%; padding: 1rem; text-align: center; }
    .md-search-btn { width: 100%; border-radius: 12px; }
    
    .md-promo-card { display: flex; flex-direction: column; text-align: center; padding: 1.5rem; }
    .md-promo-info { max-width: 100%; text-align: start;
    align-items: center;}
    .md-promo-img { width: 100px; height: 100px; margin: 0 auto; background-position: center; }
}




/* ==========================================================================
   ESTILOS PARA A PÁGINA DE PEDIDOS (.md-order-card)
   ========================================================================== */
.md-order-header-page {
    margin: 2rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eaeaea;
}

.md-order-header-page h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2b2b2b;
}

.md-order-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* O Cartão do Pedido */
.md-order-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    border-left: 6px solid #e2e8f0; /* Cor padrão */
    transition: transform 0.2s, box-shadow 0.2s;
}

.md-order-card:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

/* Cores de Estado na Borda Lateral */
.md-order-card.st-aguardando { border-left-color: #f59e0b; }
.md-order-card.st-pendente { border-left-color: #38bdf8; }
.md-order-card.st-processando { border-left-color: #3b82f6; }
.md-order-card.st-concluido { border-left-color: #10b981; }
.md-order-card.st-cancelado { border-left-color: #ef4444; }

/* Cabeçalho do Cartão */
.md-order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1rem;
}

.md-order-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 0.3rem 0;
}

.md-order-id {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
}

.md-order-id span {
    text-decoration: underline;
    cursor: pointer;
    color: #f88206;
}

/* Badges (Etiquetas de Estado) */
.md-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-aguardando { background: #fef3c7; color: #d97706; }
.badge-pendente { background: #e0f2fe; color: #0284c7; }
.badge-processando { background: #dbeafe; color: #2563eb; }
.badge-concluido { background: #d1fae5; color: #059669; }
.badge-cancelado { background: #fee2e2; color: #dc2626; }

/* Corpo e Informações */
.md-order-body {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: #475569;
}

.md-order-info-item {
    display: flex;
    flex-direction: column;
}
.md-order-info-item strong { color: #1e293b; font-size: 0.8rem; text-transform: uppercase; margin-bottom: 0.2rem; }

/* Cartão Interno do Funcionário */
.md-worker-card {
    background: #f8fafc;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    transition: background 0.2s;
    font-weight: 600;
    color: #3b82f6;
}
.md-worker-card:hover { background: #f1f5f9; }

/* Botões de Ação */
.md-order-footer {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.md-btn-sm {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s, background 0.2s;
    text-decoration: none;
}
.md-btn-sm:hover { transform: translateY(-2px); }

.btn-danger { background: #fee2e2; color: #dc2626; }
.btn-danger:hover { background: #fecaca; }
.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; }
.btn-dark { background: #1e293b; color: #fff !important; }
.btn-dark:hover { background: #0f172a; }



/* ==========================================================================
   ESTILOS DOS MODAIS MODERNOS (.md-modal)
   ========================================================================== */
.md-modal-content {
    border-radius: 24px;
    border: none;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.md-modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.5rem 1.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.md-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.md-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.md-modal-close:hover {
    color: #ef4444;
}

.md-modal-body {
    padding: 1.8rem;
    background: #fdfdfd;
}

/* Campos de Texto e Informação */
.md-form-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    display: block;
}

.md-textarea {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: #334155;
    resize: vertical;
    transition: all 0.2s;
}

.md-textarea:focus {
    outline: none;
    border-color: #f88206;
    box-shadow: 0 0 0 3px rgba(248, 130, 6, 0.1);
}

.md-info-box {
    width: 100%;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 1rem;
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 1.2rem;
    border: 1px solid #e2e8f0;
}

/* Radio Buttons Modernos (Seleção em Cartão) */
.md-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.md-radio-option {
    display: flex;
    align-items: center;
    position: relative;
}

.md-radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.md-radio-label {
    width: 100%;
    padding: 0.8rem 1.2rem;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #475569;
    transition: all 0.2s;
}

.md-radio-option input[type="radio"]:checked + .md-radio-label {
    background: #fff8f1;
    border-color: #f88206;
    color: #ea580c;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(248, 130, 6, 0.1);
}

/* Avatar do Profissional */
.md-worker-avatar-large {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin: 0 auto 1rem auto;
    overflow: hidden;
    background: #f1f5f9;
}

.md-worker-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Botão Enviar Genérico */
.md-btn-full {
    width: 100%;
    background: #f88206;
    color: #fff;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.md-btn-full:hover {
    background: #e07505;
}


/* ==========================================================================
   PAGINAÇÃO (Modern Design)
   ========================================================================== */
.md-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.md-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    min-width: 40px;
    height: 40px;
    background: #fff;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.md-page-link:hover {
    background: #f8fafc;
    color: #f88206;
    border-color: #f88206;
    transform: translateY(-2px);
}

.md-page-link.active {
    background: #f88206;
    color: #fff;
    border-color: #f88206;
    box-shadow: 0 4px 12px rgba(248, 130, 6, 0.2);
    pointer-events: none;
}


/* ==========================================================================
   PÁGINA DE CATEGORIA INTERNA (.md-cat-page)
   ========================================================================== */
.md-hero-image {
    position: relative;
    height: 220px;
    background-size: cover;
    background-position: center;
    border-radius: 24px;
    margin: 1.5rem 0 2.5rem 0;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Película escura para o texto ser sempre legível, independentemente da foto */
.md-hero-image::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.1) 100%);
    z-index: 1;
}

.md-hero-image h1 {
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Bloco que agrupa a Subcategoria e os seus serviços */
.md-subcat-group {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
}

.md-subcat-header {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: #fafafa;
    border-bottom: 1px solid #f1f5f9;
}

.md-subcat-icon {
    width: 45px; 
    height: 45px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    margin-right: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.md-subcat-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    flex: 1;
}

/* O item individual (Serviço final clicável) */
.md-service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: #475569;
    transition: background 0.2s;
}

.md-service-item:last-child { border-bottom: none; }

.md-service-item:hover { 
    background: #f8fafc; 
    color: #f88206; 
}

.md-service-item-name { 
    font-weight: 600; 
    font-size: 1rem; 
}

.md-service-item i { 
    color: #cbd5e1; 
    font-size: 1.2rem;
    transition: transform 0.2s, color 0.2s; 
}

.md-service-item:hover i { 
    transform: translateX(5px); 
    color: #f88206; 
}

/* Etiquetas de Estado (Brevemente / Indisponível) */
.md-badge-soon {
    background: #f1f5f9; 
    color: #64748b;
    padding: 0.4rem 0.8rem; 
    border-radius: 20px;
    font-size: 0.75rem; 
    font-weight: 700; 
    text-transform: uppercase;
}

.md-badge-soon.orange {
    background: #fff7ed;
    color: #ea580c;
}

.md-service-item.disabled {
    background: #f8fafc; 
    color: #94a3b8; 
    cursor: not-allowed;
    pointer-events: none; /* Impede o clique em HTML nativo */
}

.md-service-item.disabled i { display: none; }

@media screen and (max-width: 768px) {
    .md-hero-image { height: 180px; margin-top: 0; border-radius: 0 0 24px 24px; }
    .md-hero-image h1 { font-size: 1.8rem; }
}


/* ==========================================================================
   PÁGINA DE SOLICITAÇÃO DE SERVIÇO (.md-checkout)
   ========================================================================== */
.md-checkout-header {
    background: linear-gradient(135deg, #f88206 0%, #fe940d 100%);
    padding: 2.5rem 2rem;
    border-radius: 24px;
    color: #fff;
    margin: 1.5rem 0 2rem 0;
    box-shadow: 0 10px 25px rgba(248, 130, 6, 0.2);
}

.md-checkout-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.md-checkout-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

.md-checkout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-bottom: 2rem;
}

.md-form-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.8rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.04);
}

.md-form-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1rem;
}

.md-input-group {
    margin-bottom: 1.2rem;
}

.md-input-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.4rem;
}

.md-input, .md-select, .md-textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    font-size: 0.95rem;
    color: #334155;
    font-family: inherit;
    transition: all 0.2s;
}

.md-input:focus, .md-select:focus, .md-textarea:focus {
    outline: none;
    border-color: #f88206;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(248, 130, 6, 0.1);
}

.md-submit-btn {
    width: 100%;
    background: #10b981;
    color: #fff;
    border: none;
    padding: 1.2rem;
    border-radius: 16px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.md-submit-btn:hover {
    background: #059669;
    transform: translateY(-2px);
}

.md-submit-btn.processing {
    background: #475569;
    pointer-events: none;
    box-shadow: none;
}



/* ==========================================================================
   PÁGINAS DE AUTENTICAÇÃO (Login, Registo, Recuperação)
   ========================================================================== */
.md-auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f4f4f5;
    padding: 2rem 1rem;
    font-family: 'Poppins', sans-serif;
}

.md-auth-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    padding: 2.5rem 2rem;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.02);
}

.md-auth-logo {
    width: 130px;
    margin: 0 auto 1.5rem auto;
    display: block;
}

.md-auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.md-auth-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 2rem;
}

.md-auth-form {
    text-align: left;
}

.md-auth-input-group {
    margin-bottom: 1.2rem;
    position: relative;
}

/* Ícones dentro dos inputs */
.md-auth-input-group i.input-icon {
    position: absolute;
    left: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 1.1rem;
}

.md-auth-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 0.95rem;
    color: #334155;
    background: #f8fafc;
    transition: all 0.3s;
    font-family: inherit;
}

.md-auth-input:focus {
    outline: none;
    border-color: #f88206;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(248, 130, 6, 0.1);
}

.md-auth-options {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.md-auth-link {
    color: #f88206;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.md-auth-link:hover {
    opacity: 0.7;
}

.md-btn-primary {
    width: 100%;
    background: #f88206;
    color: #fff;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(248, 130, 6, 0.25);
    margin-bottom: 1rem;
}

.md-btn-primary:hover {
    background: #e07505;
    transform: translateY(-2px);
}

.md-btn-outline {
    width: 100%;
    background: transparent;
    color: #1e293b;
    border: 2px solid #e2e8f0;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: block;
    text-align: center;
}

.md-btn-outline:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

/* Alertas de Erro/Sucesso */
.md-alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.md-alert-error { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }
.md-alert-success { background: #d1fae5; color: #059669; border: 1px solid #6ee7b7; }


/* ==========================================================================
   PÁGINA DE CONTACTOS (.md-contact)
   ========================================================================== */
.md-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 2rem;
    padding-bottom: 3rem;
}

/* Coluna Esquerda: Informações */
.md-contact-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.md-contact-info-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border: 1px solid rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: transform 0.2s;
}

.md-contact-info-card:hover {
    transform: translateX(5px);
}

.md-contact-icon {
    width: 55px;
    height: 55px;
    background: #fff8f1;
    color: #f88206;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

.md-contact-details h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.2rem;
}

.md-contact-details p {
    font-size: 0.95rem;
    color: #475569;
    margin: 0;
    line-height: 1.4;
}

/* Coluna Direita: Formulário */
.md-contact-form-wrapper {
    background: #fff;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.02);
}

.md-contact-form-wrapper h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

/* Responsividade */
@media screen and (max-width: 768px) {
    .md-contact-grid {
        grid-template-columns: 1fr;
    }
}