/* ==========================================================
   ÁREA DO CLIENTE — TRIÂNGULO ENGENHARIA
   Identidade visual: fundo escuro, verde #00e64d, Barlow Condensed
   (mesma identidade do site institucional e do Portal)
========================================================== */

*{ margin:0; padding:0; box-sizing:border-box; }

body{
    font-family:'Barlow Condensed', Arial, sans-serif;
    background:#0d1117;
    color:#e6e9ed;
    min-height:100vh;
}

a{ color:inherit; text-decoration:none; }

/* ==========================================================
   TELA DE LOGIN
========================================================== */

.login-wrapper{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
}

.login-card{
    width:100%;
    max-width:400px;
    background:#151b23;
    border:1px solid #232b36;
    border-radius:16px;
    padding:40px 32px;
    box-shadow:0 20px 60px rgba(0,0,0,.4);
}

.login-card .logo-area{
    text-align:center;
    margin-bottom:28px;
}

.login-card .logo-area img{
    max-width:180px;
}

.login-card h1{
    font-size:24px;
    font-weight:600;
    text-align:center;
    margin-bottom:6px;
    letter-spacing:.02em;
}

.login-card .subtitulo{
    text-align:center;
    color:#8b95a1;
    font-size:14px;
    margin-bottom:28px;
}

.campo-login{
    margin-bottom:16px;
}

.campo-login label{
    display:block;
    font-size:13px;
    color:#b7c0cc;
    margin-bottom:6px;
}

.campo-login input{
    width:100%;
    height:46px;
    padding:0 14px;
    background:#0d1117;
    border:1px solid #2a3340;
    border-radius:10px;
    color:#e6e9ed;
    font-size:15px;
    font-family:inherit;
}

.campo-login input:focus{
    outline:none;
    border-color:#00e64d;
}

.btn-entrar{
    width:100%;
    height:48px;
    border:none;
    border-radius:10px;
    background:#00e64d;
    color:#0d1117;
    font-size:16px;
    font-weight:700;
    cursor:pointer;
    margin-top:8px;
    transition:.2s;
}

.btn-entrar:hover{
    background:#00c944;
}

.erro-login{
    background:#3a1418;
    border:1px solid #6b2028;
    color:#ff9aa2;
    padding:10px 14px;
    border-radius:10px;
    font-size:13.5px;
    margin-bottom:18px;
}

.rodape-login{
    text-align:center;
    margin-top:24px;
    font-size:12px;
    color:#5a6472;
}

/* ==========================================================
   DASHBOARD DO CLIENTE
========================================================== */

.topo-cliente{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:18px 32px;
    border-bottom:1px solid #232b36;
    background:#151b23;
}

.topo-cliente .logo-area img{
    height:34px;
}

.topo-cliente .info-cliente{
    text-align:right;
}

.topo-cliente .info-cliente strong{
    display:block;
    font-size:15px;
}

.topo-cliente .info-cliente a{
    font-size:12.5px;
    color:#8b95a1;
    text-decoration:underline;
}

.conteudo-cliente{
    max-width:1000px;
    margin:0 auto;
    padding:32px 24px 60px;
}

.conteudo-cliente h1{
    font-size:30px;
    font-weight:600;
    margin-bottom:4px;
}

.conteudo-cliente .subtitulo{
    color:#8b95a1;
    font-size:14px;
    margin-bottom:28px;
}

.secao-cliente{
    background:#151b23;
    border:1px solid #232b36;
    border-radius:16px;
    padding:24px;
    margin-bottom:22px;
}

.secao-cliente h2{
    font-size:18px;
    font-weight:600;
    margin-bottom:16px;
    display:flex;
    align-items:center;
    gap:8px;
}

/* cards financeiro */

.cards-financeiro{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:14px;
}

.card-financeiro{
    background:#0d1117;
    border:1px solid #232b36;
    border-radius:12px;
    padding:16px;
}

.card-financeiro span{
    display:block;
    font-size:12px;
    color:#8b95a1;
    margin-bottom:6px;
}

.card-financeiro strong{
    font-size:22px;
}

.card-financeiro.contratado strong{ color:#e6e9ed; }
.card-financeiro.pago strong{ color:#00e64d; }
.card-financeiro.pendente strong{ color:#f5a524; }

/* custo por categoria */

.lista-categorias{
    display:flex;
    flex-direction:column;
    gap:10px;
    margin-top:6px;
}

.item-categoria{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:10px 14px;
    background:#0d1117;
    border:1px solid #232b36;
    border-radius:10px;
    font-size:14px;
}

.item-categoria strong{
    color:#00e64d;
}

.subtitulo-secao{
    font-size:13px;
    text-transform:uppercase;
    letter-spacing:.04em;
    color:#8b95a1;
    margin:20px 0 10px;
    font-weight:600;
}

.item-pagamento span{
    display:flex;
    flex-direction:column;
    gap:2px;
}

.data-pagamento{
    font-size:11px;
    color:#5a6472;
}

.valor-pendente{
    color:#f5a524 !important;
}

/* obra / etapas */

.obra-bloco{
    margin-bottom:20px;
}

.obra-bloco:last-child{ margin-bottom:0; }

.obra-cabecalho{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:10px;
}

.obra-cabecalho strong{ font-size:16px; }

.obra-cabecalho .progresso-pct{
    color:#00e64d;
    font-weight:700;
}

.barra-progresso-fundo{
    width:100%;
    height:8px;
    background:#0d1117;
    border:1px solid #232b36;
    border-radius:999px;
    overflow:hidden;
    margin-bottom:14px;
}

.barra-progresso-preenchida{
    height:100%;
    background:#00e64d;
}

.etapa-linha{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:10px 0;
    border-bottom:1px solid #1c232d;
    font-size:14px;
}

.etapa-linha:last-child{ border-bottom:none; }

.etapa-status{
    font-size:11.5px;
    font-weight:700;
    padding:4px 10px;
    border-radius:999px;
}

.etapa-status.concluida{ background:#0f2f1a; color:#00e64d; }
.etapa-status.andamento{ background:#2a2510; color:#f5c518; }
.etapa-status.atrasada{ background:#2f1414; color:#ff6b6b; }
.etapa-status.pendente{ background:#1c232d; color:#8b95a1; }

/* timeline de progressão (linha do tempo proporcional das etapas) */

.timeline-cliente{
    margin-top:4px;
}

.timeline-linha{
    display:flex;
    align-items:center;
    gap:12px;
    padding:10px 0;
    border-bottom:1px solid #1c232d;
}

.timeline-linha:last-child{ border-bottom:none; }

.timeline-nome{
    flex:0 0 34%;
    font-size:14px;
    color:#e6e9ed;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.timeline-trilho{
    position:relative;
    flex:1 1 auto;
    height:10px;
    background:#0d1117;
    border:1px solid #232b36;
    border-radius:999px;
    overflow:hidden;
}

.timeline-barra{
    position:absolute;
    top:0;
    bottom:0;
    border-radius:999px;
}

.timeline-barra.concluida{ background:#00e64d; }
.timeline-barra.andamento{ background:#f5c518; }
.timeline-barra.atrasada{  background:#ff6b6b; }
.timeline-barra.pendente{  background:#5a6472; }

.timeline-hoje{
    position:absolute;
    top:-3px;
    bottom:-3px;
    width:2px;
    background:#ff6b6b;
    opacity:.9;
}

/* fotos */

.grupo-fotos{
    margin-bottom:20px;
}

.grupo-fotos:last-child{ margin-bottom:0; }

.grupo-fotos h3{
    font-size:14px;
    color:#b7c0cc;
    margin-bottom:10px;
    font-weight:600;
}

.grid-fotos{
    display:grid;
    grid-template-columns:repeat(auto-fill, minmax(150px, 1fr));
    gap:10px;
}

.foto-card{
    border-radius:10px;
    overflow:hidden;
    border:1px solid #232b36;
    background:#0d1117;
}

.foto-card img{
    width:100%;
    height:120px;
    object-fit:cover;
    display:block;
}

.foto-card .legenda{
    font-size:11.5px;
    color:#8b95a1;
    padding:6px 8px;
}

.vazio-cliente{
    color:#5a6472;
    font-size:14px;
    padding:14px 0;
}

@media (max-width:700px){

    .cards-financeiro{ grid-template-columns:1fr; }

    .conteudo-cliente{ padding:20px 14px 40px; }

    .conteudo-cliente h1{ font-size:24px; }

    .topo-cliente{
        padding:14px 16px;
        flex-wrap:wrap;
        gap:10px;
    }

    .topo-cliente .logo-area img{ height:26px; }

    .topo-cliente .info-cliente{ text-align:left; }

    .topo-cliente .info-cliente strong{ font-size:13.5px; }

    .secao-cliente{ padding:16px; border-radius:12px; }

    .secao-cliente h2{ font-size:16px; }

    .obra-cabecalho strong{ font-size:14px; }

    .etapa-linha{ font-size:13px; flex-wrap:wrap; gap:6px; }

    .timeline-nome{ flex-basis:38%; font-size:12.5px; }

    .timeline-linha{ font-size:12.5px; gap:8px; }

    .card-financeiro{ padding:14px; }

    .card-financeiro strong{ font-size:18px; }

    .item-categoria{ font-size:13px; padding:9px 12px; }

    .grid-fotos{ grid-template-columns:repeat(auto-fill, minmax(105px, 1fr)); gap:8px; }

    .foto-card img{ height:90px; }

    .grupo-fotos h3{ font-size:12.5px; }

}

@media (max-width:420px){

    .grid-fotos{ grid-template-columns:repeat(3, 1fr); }

    .cards-financeiro{ gap:10px; }

    .timeline-nome{ flex-basis:100%; }

    .timeline-linha{ flex-wrap:wrap; }

    .timeline-trilho{ flex-basis:100%; height:8px; }

}
