html {
    scrollbar-gutter: stable;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Poppins";
}

body {
    width: 100%;
    overscroll-behavior: none;


    min-height: 100vh;
}

/* ===== LAYOUT ===== */
.layout {
    width: 100%;
    display: flex;
    min-height: 100vh;

    padding-left: 190px;
}


/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;

    width: 190px;
    height: 100vh;

    background: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 20px;

    border-right: 1px solid #e6e6eb;
    z-index: 100;
}

.sidebar-profile {
    max-width: 100%;
    overflow: hidden;
}


/* LOGO */
.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 5px;
}

.sidebar-logo img {
    height: 24px;
}

/* DIVISÓRIAS */
.sidebar hr {
    border: none;
    border-top: 1px solid #e6e6eb;
    margin: 16px 0;
}

/* PERFIL */
.sidebar-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;

}


.profile-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* desconta o avatar */

}

.profile-name {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    display: block;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    line-height: 1.2;
}

.profile-sub {
    font-size: 11px;
    color: #64748b;
    display: block;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    line-height: 1.2;
}

/* TÍTULO MENU */
.sidebar-title {
    font-size: 10px;
    font-weight: 500;
    color: #64748b;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

/* MENU */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ITEM */
.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: #64748b;
    font-size: 12px;
    font-weight: 400;
    transition: background 0.2s ease, color 0.2s ease;
}

.menu-item:hover {
    background-color: #f5f5f5;
    color: #0f172a;
    font-weight: 600;
}

.menu-item:hover .icon {
    filter: brightness(0) saturate(100%) invert(7%) sepia(9%) saturate(1500%) hue-rotate(180deg) brightness(95%) contrast(95%);
}

.icon {
    transition: 0.2s ease;
}

/* ATIVO */
.menu-item.active {
    background: #f5f5f5;
    color: #0f172a;
    font-weight: 600;
}

/* ÍCONE */
.menu-item .icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
}


/* SAIR */
.menu-item.logout {
    border: none;
    border-top: 1px solid #e6e6eb;
    margin: 16px 0;
    margin-top: auto;
    color: #64748b;
    margin-bottom: -15px;

}

.menu-item.logout:hover {
    background: #f1f1f1;

}




/* ===== MAIN ===== */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;

    height: 100vh;
    overflow-y: auto;
}


/* ===== TOPBAR ===== */
.topbar {

    position: relative;
    display: flex;
    align-items: center;
    padding: 16px;
    background: #fff;
    margin-bottom: 16px;
}

/* ===== SEARCH CENTRAL ===== */
.search-wrapper {

    top: 30%;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 250px;
    max-width: 90%;
}



.search-input {
    width: 100%;
    height: 36px;
    padding: 0 16px 0 42px;
    border-radius: 999px;
    border: 1px solid #e6e6eb;
    background: #ffffff;
    font-size: 13px;
    color: #0f172a;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-input::placeholder {
    color: #9a9aab;
}

/* ÍCONE */
.search-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    opacity: 0.8;
    pointer-events: none;
}

/* FOCUS */
.search-input:focus {
    border: 1px solid #a1a1a1;

}

/*.search-wrapper:focus-within .search-icon {
    filter: brightness(0) saturate(100%) invert(18%) sepia(95%) saturate(2300%) hue-rotate(242deg) brightness(70%) contrast(130%);
} */

/* Botão menu (hidden no desktop) */
.menu-btn {
    color: #64748b;
    display: none;
    font-size: 22px;
    background: none;
    border: none;
    cursor: pointer;
}





/* ===========================
   CONTEÚDO PRINCIPAL
   =========================== */




.panel-content {
    flex: 1;
    display: flex;
    justify-content: center;
    width: 100%;

}

.panel-inner {
    overscroll-behavior: contain;

    width: 100%;
    max-width: 1200px;
    /* controla largura máxima */
    padding: 24px;
    margin-inline: auto;

}

@media (max-width: 900px) {

    .projects-container,
    .skeleton-container {
        grid-template-columns: 1fr !important;
    }
}


/* Card padrão dos projetos */
.project-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 22px 20px;
    border: 1px solid #eaeaea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: transform .18s ease, box-shadow .18s ease, border .18s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Efeito hover premium */
.project-card:hover {
    border: 1px solid #a1a1a1;

    transform: translateY(-4px);

}

/* Ícone do card */
.project-card .icon {
    width: 42px;
    height: 42px;
    background: #F6AA12;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: 700;
    box-shadow: 0 3px 6px rgba(246, 170, 18, 0.4);
}

.project-name {
    color: #0f172a !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}


/* Tipo do projeto */
.project-card p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
}

/* Badge de status */
.project-card .status-badge {
    margin-top: 8px;
    padding: 8px 14px;
    font-size: 12px;
    border-radius: 20px;
    font-weight: 600;
    width: fit-content;
}

/* Cores dinâmicas (você aplica via JS) */
.status-aguardando {
    background: #fff5cc;
    color: #a88609 !important;
}


.status-pagamento {
    background: #e0f0ff;
    color: #2d6cd3 !important;
}


.status-emprogresso {
    background: #d4ffe0;
    color: #248b47 !important;
}

.projects-container,
.skeleton-container {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    width: 100%;
}


/* texto do card — mantém o estilo padrão, só garante alinhamento */
.project-card.create-card p {
    color: #64748b !important;
    font-size: 12px;

}

.empty-state {
    width: 100%;
    margin-top: 20px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0.85;
}

.empty-state img {
    max-width: 320px;
}

.empty-title {
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    /* cinza escuro */
    margin: 0;
}

/* Subtítulo dinâmico */
.empty-subtitle {
    font-size: 14px;
    font-weight: 400;
    color: #64748b;
    /* cinza médio */
    max-width: 420px;
    margin: 0;
    line-height: 1.4;
}

/* ===========================
   SKELETON LOADING
   (mesmo tamanho do card)
   =========================== */


.skeleton-card {
    width: auto;
    min-height: 204px;
    /* MESMO TAMANHO */
    padding: 22px 20px;
    /* MESMO PADDING */
    border-radius: 10px;
    /* MESMO RADIUS */
    box-sizing: border-box;

    background: linear-gradient(90deg,
            #f2f2f2 25%,
            #e6e6e6 37%,
            #f2f2f2 63%);
    background-size: 400% 100%;
    border: 1px solid #eaeaea;

    animation: skeleton-loading 1.4s ease infinite;
}

/* animação suave */
@keyframes skeleton-loading {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}



/* ===== OVERLAY ===== */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 998;
}


.overlay.show {
    opacity: 1;
    pointer-events: all;
}


/* =========================
   MOBILE
========================= */
@media (max-width: 900px) {

    body.menu-open .fab-create {
        pointer-events: none;
        opacity: 0.5;
    }

    .layout {
        padding-left: 0;
    }

    .panel-inner {
        padding-top: 0;
    }


    /* Sidebar escondida */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        height: 100dvh !important;
        max-height: 100dvh !important;
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    /* Overlay ativo */
    .overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .4);
        display: none;
        z-index: 900;
    }

    .overlay.show {
        display: block;
    }

    /* Topbar mobile */
    .topbar {
        justify-content: flex-start;
    }

    .menu-btn {
        margin-top: 8px;
        margin-left: 8px;
        display: block;
    }

}






.fab-create {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(180deg, #4f3aaa, #5540b3, #6049c4);

    /* roxo */
    color: #fff;
    font-size: 32px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    /* 👇 Adiciona animação de pulso */
    animation: fab-pulse 2.0s infinite ease-in-out;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fab-create:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.fab-create:active {
    transform: scale(0.95);
}




@keyframes fab-pulse {
    0% {
        box-shadow: 0 0 0 0 #c6b9ff;
    }

    70% {
        box-shadow: 0 0 0 20px #ffc14600;
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 70, 0);
    }
}


/* tamanhos menores em telas pequenas */
@media (max-width: 480px) {
    .fab-create {
        right: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom));
        width: 56px;
        height: 56px;
    }

}

/* Suporte para sites RTL (direção direita->esquerda) */
:root[dir="rtl"] .fab-create {
    right: auto;
    left: 24px;
}

/* ===========================
   SKELETON DE TEXTO (PERFEITO)
   =========================== */
.sidebar-profile.loading .profile-name,
.sidebar-profile.loading .profile-sub {
    display: inline-block;

    /* 🔥 impede criação de 2 linhas */
    white-space: nowrap;

    /* 🔥 largura controlada (simula texto real) */
    max-width: 160px;
    /* name */
    width: 100%;

    color: transparent;
    line-height: 1.2em;

    background: linear-gradient(90deg,
            #e6e6eb 25%,
            #f2f2f2 37%,
            #e6e6eb 63%);
    background-size: 400% 100%;
    border-radius: 4px;

    animation: shimmer 1.4s ease infinite;
}

.sidebar-profile.loading .profile-name {
    max-width: 90px;
    /* nome costuma ser menor */
}

.sidebar-profile.loading .profile-sub {
    max-width: 110px;
    /* email maior */
}


/* ===========================
   MODAL CONFIRMAÇÃO
   =========================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);

    display: none;

    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* 🔥 classe exclusiva do modal */
.modal-overlay.modal-open {
    display: flex;
}

/* CAIXA */
.modal-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalFade 0.2s ease-out;
}

/* TEXTO */
.modal-box h3 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.modal-box p {
    margin: 0 0 20px;
    font-size: 12px;
    line-height: 1.5;
    color: #64748b;
}

/* AÇÕES */
.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* BOTÕES */
.modal-actions button {
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    border: none;
}

.btn-secondary {
    background: #fff;
    color: #64748b;
}

.btn-primary1 {
    background: #5540b3;
    color: #ffffff;
}

.btn-primary1:hover {
    background: #5d47be;
}

/* ANIMAÇÃO */
@keyframes modalFade {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}




/* PÁGINA DE DETALHES */


.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.details-header h2 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: #111827;
}

.upgrade-link {
    font-size: 12px;
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
}

.upgrade-link:hover {
    text-decoration: underline;
}

/* Lista */
.details-list {
    display: flex;
    flex-direction: column;
}

/* Linha */
.details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #f0f1f4;
    gap: 40px;
}

.details-row:last-child {
    border-bottom: none;
}

.details-label {
    font-size: 12px;
    color: #64748b;
}

.details-value {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
}



/* Reutiliza o mesmo card */
.details-card {
    width: 100%;
    max-width: 720px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}



/* Status do projeto */
.status-badge {
    display: inline-block;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    line-height: 1;
    white-space: nowrap;
}

.details-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}


.details-column-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.details-column-right {
    display: flex;
    flex-direction: column;
    /* força os filhos a ficarem em coluna */
    gap: 20px;
    /* espaçamento entre o card e os botões */
}

.color-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.loading-text {
    color: transparent;
}


/* Texto da descrição */
#projectDescription {
    font-size: 12px;
    font-weight: 600;
    color: #0f172a;
    font-family: 'Poppins', sans-serif;

    line-height: 1.5;

    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;

    overflow: hidden;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Quando expandido */
#projectDescription.expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    display: block;
}

/* Botão "Ver mais" */
.btn-ver-mais {
    display: none;
    background: none;
    border: none;
    color: #4f46e5;

    font-size: 12px;
    /* 🔒 igual ao texto */
    font-weight: 600;
    /* 🔒 igual ao texto */
    font-family: 'Poppins';
    /* 🔒 trava fonte */

    cursor: pointer;
    padding: 0;
    margin-top: 6px;
    align-self: flex-start;
}

.btn-ver-mais:hover {
    text-decoration: underline;
}

/* Wrapper para manter alinhamento */
.project-description-wrapper {
    display: flex;
    flex-direction: column;
}


.details-action-field {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    white-space: nowrap;
}

.details-action-link {
    font-size: 13px;
    font-weight: 600;
    color: #5540b3;
    text-decoration: none;
    cursor: pointer;
    line-height: 1;
}

.details-action-link:hover {
    opacity: 0.7;
    color: #6049c4;
}


@media (max-width: 900px) {
    .details-layout {
        grid-template-columns: 1fr;
    }

}

.inline-text {
    cursor: pointer;
    transition: color 0.15s ease;
}


.inline-edit {
    width: auto;
    min-width: 90px;
    max-width: 160px;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #0f172a !important;
    font-family: inherit;
    padding: 4px 6px;
    border: none;
    outline: none;
}


.details-input {
    border: none;
    background: transparent;
    font-size: inherit;
    font-family: inherit;
    color: inherit;
    padding: 0;
    width: auto;
}


.action-icon {
    width: 18px;
    height: 18px;
}

.clickable-icon {
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.clickable-icon:hover {
    transform: translateY(-2px);
    opacity: 0.8;
}