:root {
    --incode-orange: #FD7E25;
    --incode-black: #191919;
    --incode-gray-medium: #CFC9BC;
    --incode-gray-light: #F3F1EE;
    --incode-white: #FFFFFF;
    --incode-border: #E6E1D8;
    --incode-text: #222222;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--incode-gray-light);
    color: var(--incode-text);
    font-family: Arial, Helvetica, sans-serif;
}

.app-body {
    background: var(--incode-gray-light);
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 240px;
    background: var(--incode-black);
    color: white;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.sidebar-brand {
    padding: 4px 8px;
}

.brand-link {
    text-decoration: none;
    color: white;
    font-size: 2rem;
    font-weight: 700;
}

.brand-accent {
    color: var(--incode-orange);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-link {
    text-decoration: none;
    color: #f3f3f3;
    padding: 12px 14px;
    border-radius: 10px;
    transition: 0.2s ease;
    display: block;
}

    .sidebar-link:hover,
    .sidebar-link.active {
        background: rgba(253, 126, 37, 0.14);
        color: white;
    }

.sidebar-link-cta {
    background: var(--incode-orange);
    color: white !important;
    font-weight: 600;
}

    .sidebar-link-cta:hover {
        background: #eb6e18;
    }

.sidebar-link.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px 10px 0 10px;
}

.logout-form {
    width: 100%;
}

.btn-logout {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--incode-orange);
    background: transparent;
    color: var(--incode-orange);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .btn-logout:hover {
        background: rgba(253, 126, 37, 0.08);
        border-color: var(--incode-orange);
        color: var(--incode-orange);
    }

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-topbar {
    margin: 16px 24px 0 24px;
    padding: 22px 28px;
    background: linear-gradient(135deg, #0f172a 0%, #162033 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
    position: relative;
    overflow: hidden;
}

    .app-topbar::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        width: 6px;
        height: 100%;
        background: linear-gradient(180deg, #ff7a1a 0%, #ff9f43 100%);
    }

.topbar-title {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.02em;
}

.topbar-subtitle {
    margin: 6px 0 0;
    font-size: 1rem;
    color: #cbd5e1;
}

.app-content {
    padding: 8px 32px 32px 32px;
}

.page-card {
    background: white;
    border-radius: 18px;
    box-shadow: 0 10px 28px rgba(25, 25, 25, 0.08);
    border: 1px solid var(--incode-border);
    padding: 24px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: white;
    border: 1px solid var(--incode-border);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 8px 20px rgba(25, 25, 25, 0.05);
    position: relative;
    overflow: hidden;
}

    .kpi-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 4px;
        background: #e5e7eb;
    }

    .kpi-card:nth-child(2)::before {
        background: #f97316;
    }

    .kpi-card:nth-child(3)::before {
        background: #16a34a;
    }

    .kpi-card:nth-child(4)::before {
        background: #dc2626;
    }

.kpi-label {
    font-size: 0.9rem;
    color: #6d6d6d;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 2.2rem;
    font-weight: 800;
}

    .kpi-value.orange {
        color: var(--incode-orange);
    }

    .kpi-value.red {
        color: #dc2626;
    }

.table-modern thead th {
    border-bottom: 1px solid var(--incode-border);
    color: var(--incode-black);
    font-size: 0.95rem;
    white-space: nowrap;
}

.table-modern tbody td {
    vertical-align: middle;
    border-color: #efefef;
}

.table-modern tbody tr:hover {
    background: rgba(253, 126, 37, 0.06);
    cursor: pointer;
}

.badge-status {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-block;
}

.badge-nao-iniciado {
    background: #7b8794;
    color: white;
}

.badge-em-andamento {
    background: #2d6cdf;
    color: white;
}

.badge-aguardando {
    background: #ffc107;
    color: #191919;
}

.badge-finalizado {
    background: #198754;
    color: white;
}

.badge-cancelado {
    background: #dc3545;
    color: white;
}

.badge-reprovado {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-prioridade-baixa,
.badge-prioridade-media,
.badge-prioridade-alta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

.badge-prioridade-baixa {
    background: #e2e8f0;
    color: #475569;
}

.badge-prioridade-media {
    background: #fef3c7;
    color: #b45309;
}

.badge-prioridade-alta {
    background: #fee2e2;
    color: #b91c1c;
}

.btn-incode-outline {
    border: 1px solid var(--incode-orange);
    color: var(--incode-orange);
    background: white;
    border-radius: 10px;
    padding: 6px 12px;
}

    .btn-incode-outline:hover {
        background: var(--incode-orange);
        color: white;
    }

.btn-incode-danger {
    border: 1px solid #dc3545;
    color: #dc3545;
    background: white;
}

    .btn-incode-danger:hover {
        background: #dc3545;
        color: white;
    }

.paginacao-container {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.paginacao-info {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

.paginacao-acoes {
    display: flex;
    gap: 8px;
}

    .paginacao-acoes .btn {
        min-width: 90px;
        border-radius: 10px;
    }

    .paginacao-acoes button:disabled {
        opacity: .55;
        cursor: not-allowed;
    }

.toast-container-incode {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast-incode {
    min-width: 320px;
    max-width: 420px;
    padding: 14px 16px;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(25, 25, 25, 0.18);
    border-left: 5px solid #FD7E25;
    background: #ffffff;
    color: #191919;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: toastSlideIn 0.25s ease;
}

    .toast-incode.success {
        border-left-color: #198754;
    }

    .toast-incode.error {
        border-left-color: #dc3545;
    }

    .toast-incode.info {
        border-left-color: #FD7E25;
    }

.toast-incode-icon {
    font-size: 1.1rem;
    line-height: 1.2;
    margin-top: 1px;
}

.toast-incode-content {
    flex: 1;
}

.toast-incode-title {
    font-weight: 700;
    margin-bottom: 2px;
}

.toast-incode-message {
    font-size: 0.95rem;
    color: #555;
}

.toast-incode-close {
    background: transparent;
    border: none;
    color: #777;
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px) translateX(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

[x-cloak] {
    display: none !important;
}

.modal-overlay-incode {
    position: fixed;
    inset: 0;
    background: rgba(25, 25, 25, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    padding: 20px;
}

.modal-incode {
    width: 100%;
    max-width: 460px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
    border: 1px solid var(--incode-border);
    overflow: hidden;
}

.modal-incode-header {
    padding: 18px 22px 10px 22px;
    border-bottom: 1px solid #f0ece6;
}

    .modal-incode-header h5 {
        margin: 0;
        font-weight: 700;
        color: var(--incode-black);
    }

.modal-incode-body {
    padding: 18px 22px;
    color: #444;
}

.modal-incode-footer {
    padding: 14px 22px 22px 22px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.project-summary-card {
    background: white;
    border: 1px solid var(--incode-border);
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(25, 25, 25, 0.08);
    padding: 28px;
}

.project-summary-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--incode-black);
    margin-bottom: 18px;
}

.project-summary-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 24px;
}

.summary-item {
    background: #faf8f5;
    border: 1px solid #efeae2;
    border-radius: 14px;
    padding: 14px 16px;
}

.summary-label {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 6px;
}

.summary-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--incode-black);
}

.details-section-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--incode-black);
    margin: 8px 0 0 0;
}

.etapas-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.etapa-card {
    background: white;
    border: 1px solid var(--incode-border);
    border-left: 5px solid var(--incode-orange);
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(25, 25, 25, 0.06);
    padding: 22px;
}

.etapa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.etapa-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--incode-black);
    margin: 0;
}

.etapa-subinfo {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.etapa-chip {
    background: #f6f2ec;
    border: 1px solid #ece4d8;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: #444;
}

.etapa-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    border-top: 1px solid #f1ece5;
    padding-top: 14px;
    margin-top: 14px;
}

.etapa-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.btn-incode-success {
    background: #198754;
    border: 1px solid #198754;
    color: white;
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 600;
}

    .btn-incode-success:hover {
        background: #157347;
        border-color: #157347;
        color: white;
    }

.details-badge {
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-block;
    white-space: nowrap;
}

    .details-badge.nao-iniciado {
        background: #7b8794;
        color: white;
    }

    .details-badge.em-andamento {
        background: #2d6cdf;
        color: white;
    }

    .details-badge.aguardando {
        background: #ffc107;
        color: #191919;
    }

    .details-badge.finalizado {
        background: #198754;
        color: white;
    }

    .details-badge.cancelado {
        background: #dc3545;
        color: white;
    }

    .details-badge.pendente {
        background: #6c757d;
        color: white;
    }

    .details-badge.aprovado {
        background: #198754;
        color: white;
    }

    .details-badge.negado {
        background: #dc3545;
        color: white;
    }

    .details-badge.direcionado {
        background: #0d6efd;
        color: white;
    }

    .details-badge.atrasado {
        background: #fd7e14;
        color: white;
    }

.etapa-header-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.etapa-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.etapa-preview {
    border-top: 1px solid #f1ece5;
    padding-top: 14px;
    color: #555;
}

.etapa-preview-text {
    font-size: 0.95rem;
    line-height: 1.5;
}

.etapa-card .form-control,
.etapa-card .form-select {
    max-width: 980px;
}

.app-footer {
    width: 100%;
    padding: 12px 20px;
    text-align: center;
    font-size: 13px;
    color: #cbd5e1;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #081227;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

    .app-footer strong {
        color: #38bdf8;
    }

.kanban-board {
    display: grid;
    grid-template-columns: repeat(5, minmax(260px, 1fr));
    gap: 16px;
    align-items: start;
}

.kanban-column {
    background: #f8f9fb;
    border: 1px solid #e7e7e7;
    border-radius: 18px;
    min-height: 520px;
    padding: 14px;
}

.kanban-column-header {
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ececec;
}

.kanban-column-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kanban-card {
    background: #ffffff;
    border: 1px solid #ebebeb;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    cursor: grab;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .kanban-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    }

.kanban-card-title {
    font-size: 15px;
    line-height: 1.35;
}

.kanban-card-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: #475569;
    margin-bottom: 12px;
}

.kanban-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.04em;
}

.kanban-card-footer {
    display: flex;
    justify-content: flex-end;
}

.kanban-empty {
    border: 1px dashed #d6d6d6;
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    color: #94a3b8;
    background: #fcfcfd;
}

@media (max-width: 1600px) {
    .kanban-board {
        grid-template-columns: repeat(3, minmax(260px, 1fr));
    }
}

@media (max-width: 1100px) {
    .kanban-board {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
    }
}

@media (max-width: 992px) {
    .app-shell {
        flex-direction: column;
    }

    .app-sidebar {
        width: 100%;
        border-radius: 0;
    }

    .kpi-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .kanban-board {
        grid-template-columns: 1fr;
    }

    .project-summary-meta {
        grid-template-columns: 1fr;
    }

    .etapa-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .etapa-header-right {
        width: 100%;
        justify-content: space-between;
    }
}

.link-esqueci-senha,
.link-esqueci-senha:visited {
    color: #6b7280;
    font-size: 0.85rem;
    text-decoration: none;
}

    .link-esqueci-senha:hover {
        color: #ff7a1a;
    }