/* ============================================================
   BIRITEX OS — PROJECT VIEW
   ============================================================ */

.project-view {
    width: 100%;
    min-height: 100vh;
    background: #f6f7f8;
    color: #2F353B;
}


/* ============================================================
   HEADER
   ============================================================ */

.project-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(47, 53, 59, .08);
    padding: 28px clamp(20px, 4vw, 60px);
}

.project-header-main {
    max-width: 1500px;
    margin: 0 auto;
}

.project-back-link {
    display: inline-flex;
    margin-bottom: 24px;
    color: #687078;
    text-decoration: none;
    font-size: 14px;
    transition: .25s ease;
}

.project-back-link:hover {
    color: #D6534D;
    transform: translateX(-3px);
}

.project-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
}

.project-id {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #D6534D;
    margin-bottom: 8px;
}

.project-title-row h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 52px);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.project-title-row p {
    max-width: 760px;
    margin: 16px 0 0;
    color: #687078;
    line-height: 1.7;
}

.project-header-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}


/* ============================================================
   SUMMARY
   ============================================================ */

.project-summary {
    max-width: 1500px;
    margin: 0 auto;
    padding: 24px clamp(20px, 4vw, 60px);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.project-summary-card {
    background: #ffffff;
    border: 1px solid rgba(47, 53, 59, .08);
    border-radius: 14px;
    padding: 20px;
    transition: transform .25s ease, box-shadow .25s ease;
}

.project-summary-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(47, 53, 59, .08);
}

.project-summary-card span {
    display: block;
    color: #7b838a;
    font-size: 12px;
    margin-bottom: 8px;
}

.project-summary-card strong {
    display: block;
    font-size: 20px;
}


/* ============================================================
   LAYOUT
   ============================================================ */

.project-layout {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 clamp(20px, 4vw, 60px) 60px;

    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
}

.project-main {
    min-width: 0;
}


/* ============================================================
   TABS
   ============================================================ */

.project-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 5px;
    background: #e9ecef;
    border-radius: 12px;
    margin-bottom: 20px;
}

.project-tab {
    border: 0;
    background: transparent;
    padding: 11px 17px;
    border-radius: 8px;
    cursor: pointer;
    color: #687078;
    white-space: nowrap;
    font: inherit;
    transition: .2s ease;
}

.project-tab:hover {
    color: #2F353B;
}

.project-tab.is-active {
    background: #ffffff;
    color: #2F353B;
    box-shadow: 0 2px 8px rgba(47, 53, 59, .08);
    font-weight: 700;
}

.project-tab-view {
    display: none;
    animation: projectFadeIn .3s ease;
}

.project-tab-view.is-active {
    display: block;
}

@keyframes projectFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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


/* ============================================================
   PANELS
   ============================================================ */

.project-panel,
.project-side-panel {
    background: #ffffff;
    border: 1px solid rgba(47, 53, 59, .08);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
}

.project-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.project-panel-head h2 {
    margin: 4px 0 0;
    font-size: 20px;
}

.panel-eyebrow {
    display: block;
    color: #D6534D;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.project-description {
    color: #687078;
    line-height: 1.8;
}


/* ============================================================
   OVERVIEW GRID
   ============================================================ */

.project-section-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}


/* ============================================================
   PROGRESS
   ============================================================ */

.project-progress {
    height: 10px;
    background: #eceff1;
    border-radius: 999px;
    overflow: hidden;
}

.project-progress-bar {
    height: 100%;
    background: #D6534D;
    border-radius: inherit;
    transition: width 1s ease;
}

.project-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 10px;
    color: #7b838a;
    font-size: 12px;
}


/* ============================================================
   TIMELINE
   ============================================================ */

.project-timeline {
    position: relative;
    padding-left: 20px;
}

.project-timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 5px;
    bottom: 5px;
    width: 1px;
    background: #dfe3e6;
}

.timeline-item {
    position: relative;
    display: flex;
    gap: 18px;
    padding: 0 0 25px 12px;
}

.timeline-marker {
    position: absolute;
    left: -20px;
    top: 3px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #d9dde0;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 1px #d9dde0;
}

.timeline-item.completed .timeline-marker {
    background: #2F353B;
}

.timeline-item.active .timeline-marker {
    background: #D6534D;
    box-shadow: 0 0 0 4px rgba(214, 83, 77, .15);
}

.timeline-item strong,
.timeline-item span {
    display: block;
}

.timeline-item strong {
    font-size: 14px;
}

.timeline-item span {
    color: #7b838a;
    font-size: 12px;
    margin-top: 4px;
}


/* ============================================================
   TASKS
   ============================================================ */

.project-task-list {
    border-top: 1px solid #edf0f2;
}

.project-task {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto 30px;
    align-items: center;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #edf0f2;
}

.task-check {
    width: 24px;
    height: 24px;
    border: 1px solid #cfd4d8;
    border-radius: 7px;
    display: grid;
    place-items: center;
    font-size: 12px;
}

.task-check.is-complete {
    background: #2F353B;
    color: #ffffff;
    border-color: #2F353B;
}

.task-content strong,
.task-content span {
    display: block;
}

.task-content strong {
    font-size: 14px;
}

.task-content span {
    color: #8a9197;
    font-size: 12px;
    margin-top: 4px;
}

.task-status {
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: #eef0f2;
}

.task-status.completed {
    background: #e8f2ec;
    color: #37634a;
}

.task-status.in-progress {
    background: #fff0ee;
    color: #a7443d;
}

.task-status.pending {
    background: #f0f1f2;
    color: #70777d;
}

.task-menu {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
    color: #7b838a;
}


/* ============================================================
   DELIVERABLES
   ============================================================ */

.deliverable-list {
    display: grid;
    gap: 10px;
}

.deliverable-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid #edf0f2;
    border-radius: 10px;
}

.deliverable-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: #f0f2f3;
}

.deliverable-item > div:nth-child(2) {
    flex: 1;
}

.deliverable-item strong,
.deliverable-item span {
    display: block;
}

.deliverable-item strong {
    font-size: 14px;
}

.deliverable-item span {
    font-size: 12px;
    color: #7b838a;
    margin-top: 3px;
}


/* ============================================================
   FINANCE
   ============================================================ */

.project-finance-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.project-finance-card {
    padding: 20px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(47, 53, 59, .08);
}

.project-finance-card span {
    display: block;
    color: #7b838a;
    font-size: 12px;
    margin-bottom: 8px;
}

.project-finance-card strong {
    font-size: 20px;
}

.project-finance-table {
    width: 100%;
    overflow-x: auto;
}

.finance-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr .8fr;
    gap: 15px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #edf0f2;
    min-width: 550px;
    font-size: 13px;
}

.finance-heading {
    color: #7b838a;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.payment-paid {
    color: #37634a;
    font-weight: 700;
}

.payment-unpaid {
    color: #a7443d;
    font-weight: 700;
}


/* ============================================================
   ACTIVITY
   ============================================================ */

.activity-list {
    position: relative;
}

.activity-item {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
}

.activity-dot {
    width: 10px;
    height: 10px;
    background: #D6534D;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.activity-item p {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.activity-item span {
    display: block;
    color: #8a9197;
    font-size: 12px;
    margin-top: 5px;
}

.project-notes {
    display: grid;
    gap: 10px;
}

.project-note {
    background: #f7f8f8;
    border-left: 3px solid #D6534D;
    padding: 14px;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.6;
}


/* ============================================================
   SIDEBAR
   ============================================================ */

.project-sidebar {
    min-width: 0;
}

.project-side-panel {
    position: relative;
}

.project-side-panel h3 {
    margin: 8px 0 15px;
    font-size: 18px;
}

.client-details {
    display: grid;
    gap: 6px;
    color: #7b838a;
    font-size: 12px;
    margin-bottom: 18px;
}

.full-btn {
    width: 100%;
    justify-content: center;
}

.project-info-list {
    display: grid;
    gap: 15px;
    margin-top: 18px;
}

.project-info-list div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.project-info-list span {
    color: #8a9197;
    font-size: 12px;
}

.project-info-list strong {
    font-size: 12px;
    text-align: right;
}

.project-quick-actions {
    display: grid;
    gap: 5px;
    margin-top: 15px;
}

.project-quick-actions button {
    border: 0;
    background: transparent;
    padding: 10px 0;
    text-align: left;
    cursor: pointer;
    color: #4d555b;
    font: inherit;
    border-bottom: 1px solid #edf0f2;
    transition: .2s ease;
}

.project-quick-actions button:hover {
    color: #D6534D;
    padding-left: 5px;
}


/* ============================================================
   STATUS
   ============================================================ */

.status-badge {
    display: inline-flex !important;
    width: fit-content;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 11px !important;
}

.status-progress {
    background: #fff0ee;
    color: #a7443d;
}


/* ============================================================
   MODAL
   ============================================================ */

.project-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
}

.project-modal.is-open {
    display: flex;
}

.project-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 24, 27, .55);
    backdrop-filter: blur(5px);
}

.project-modal-box {
    position: relative;
    width: min(500px, 100%);
    background: #ffffff;
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .2);
    animation: modalIn .25s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(.98);
    }

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

.project-modal-box h2 {
    margin: 6px 0 10px;
}

.project-modal-box p {
    color: #687078;
    line-height: 1.6;
}

.project-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    border: 0;
    background: transparent;
    font-size: 25px;
    cursor: pointer;
}

.project-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 25px;
}


/* ============================================================
   EMPTY STATE
   ============================================================ */

.project-not-found {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.project-empty-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff0ee;
    color: #D6534D;
    display: grid;
    place-items: center;
    font-weight: 800;
    margin-bottom: 20px;
}


/* ============================================================
   SMALL BUTTON
   ============================================================ */

.small-btn {
    padding: 8px 12px;
    font-size: 12px;
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 1100px) {

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

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

    .project-sidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .project-side-panel {
        margin-bottom: 0;
    }

}


@media (max-width: 760px) {

    .project-header {
        padding: 22px 16px;
    }

    .project-title-row {
        flex-direction: column;
    }

    .project-title-row h1 {
        font-size: 32px;
    }

    .project-header-actions {
        width: 100%;
    }

    .project-header-actions button {
        flex: 1;
    }

    .project-summary {
        grid-template-columns: repeat(2, 1fr);
        padding: 16px;
    }

    .project-layout {
        padding: 0 16px 40px;
    }

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

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

    .project-task {
        grid-template-columns: 30px minmax(0, 1fr) 30px;
    }

    .task-status {
        display: none;
    }

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

    .project-panel {
        padding: 18px;
    }

    .project-panel-head {
        align-items: flex-start;
    }

    .project-panel-head .primary-btn {
        white-space: nowrap;
    }

}


@media (max-width: 480px) {

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

    .project-header-actions {
        flex-direction: column;
    }

    .project-header-actions button {
        width: 100%;
    }

    .project-title-row p {
        font-size: 14px;
    }

    .project-tabs {
        margin-left: -2px;
        margin-right: -2px;
    }

    .project-tab {
        padding: 10px 13px;
        font-size: 12px;
    }

    .project-modal-box {
        padding: 24px 18px;
    }

}