/*==================================
   MYNUKKAD PROJECT DASHBOARD STYLES
==================================*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #f4f7fc;
    color: #333;
    line-height: 1.6;
}

/*==================================
        HEADER & NAVBAR
==================================*/

header {
    background: #0b1033;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 42px;
    font-weight: 700;
}

.logo span {
    color: #ffb400;
}

.logo p {
    margin-top: 5px;
    color: #ddd;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
}

.top-links {
    display: flex;
    gap: 20px;
}

.top-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: .3s;
}

.top-links a:hover {
    color: #ffb400;
}

.nav-auth-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.nav-auth-btns {
    display: flex;
    gap: 6px;
}
.nav-auth-btns .signup-btn:hover,
.nav-auth-btns .signin-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}
.profile-btn {
    padding: 8px 18px;
    font-size: 14px;
    border-radius: 10px;
    text-decoration: none;
    color: #ffffff !important;
    background: linear-gradient(135deg, #ffb400, #ff8b3d) !important;
    transition: .3s;
}


.profile-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.logout-btn {
    padding: 8px 18px;
    font-size: 14px;
    border-radius: 10px;
    text-decoration: none;
    color: #ffffff !important;
    background: linear-gradient(135deg, #ffb400, #ff8b3d) !important;
    transition: .3s;
}

.logout-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.search-box {
    display: flex;
}

.search-box input {
    width: 320px;
    padding: 12px 16px;
    border: none;
    outline: none;
    border-radius: 10px 0 0 10px;
    font-size: 14px;
}

.search-box button {
    border: none;
    cursor: pointer;
    color: #fff;
    padding: 12px 24px;
    font-weight: 600;
    background: linear-gradient(135deg, #16215f, #ffb400);
    border-radius: 0 10px 10px 0;
    transition: 0.3s;
    font-size: 14px;
}

.search-box button:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.search-box button i {
    margin-right: 8px;
}

.navbar {
    background: #16215f;
    display: flex;
    align-items: center;
    padding: 0 30px;
    overflow-x: auto;
}

.navbar a {
    color: #fff;
    text-decoration: none;
    padding: 16px 20px;
    transition: .3s;
    font-weight: 500;
    white-space: nowrap;
}

.navbar a:hover,
.navbar .active {
    color: #ffb400;
    border-bottom: 3px solid #ffb400;
}

/*==================================
       PAGE TITLE & FILTERS
==================================*/

.page-title {
    text-align: center;
    padding: 40px 20px 20px;
}

.page-title h2 {
    color: #16215f;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-title h2 i {
    color: #ffb400;
    margin-right: 12px;
}

.page-title p {
    color: #64748b;
    font-size: 16px;
}

/* Filter Controls Bar */
.filter-section {
    width: 92%;
    max-width: 1400px;
    margin: 20px auto 35px;
}

.filter-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 22px 28px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    align-items: end;
}

.field {
    display: flex;
    flex-direction: column;
}

.field label {
    font-weight: 600;
    font-size: 13px;
    color: #16215f;
    margin-bottom: 6px;
}

.field select,
.field input {
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    outline: none;
    font-size: 14px;
    background: #fff;
    transition: 0.2s;
    color: #1e293b;
}

.field select:focus,
.field input:focus {
    border-color: #ffb400;
    box-shadow: 0 0 0 3px rgba(255, 180, 0, 0.2);
}

.refresh-btn {
    padding: 11px 20px;
    background: #16215f;
    color: #ffb400;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.refresh-btn:hover {
    background: #0b1033;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 16, 51, 0.2);
}

/*==================================
    SUMMARY CARDS (GRID)
==================================*/

.summary-cards-container {
    width: 92%;
    max-width: 1400px;
    margin: 0 auto 35px;
}

.summary-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.primary-stat-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.primary-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.09);
}

.primary-stat-card .card-icon {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.primary-stat-card.projects .card-icon {
    background: rgba(255, 180, 0, 0.2);
    color: #d97706;
}

.primary-stat-card.approved .card-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.primary-stat-card.pending .card-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.primary-stat-card.ongoing .card-icon {
    background: rgba(0, 188, 212, 0.15);
    color: #00bcd4;
}

.primary-stat-card.completed .card-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.primary-stat-card.rejected .card-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.primary-stat-card.budget .card-icon {
    background: rgba(16, 185, 129, 0.2);
    color: #059669;
}

.primary-stat-card.locations .card-icon {
    background: rgba(109, 69, 255, 0.15);
    color: #6d45ff;
}

.primary-stat-card .card-info h3 {
    font-size: 28px;
    font-weight: 700;
    color: #16215f;
    line-height: 1.1;
}

.primary-stat-card .card-info p {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    margin-top: 4px;
}

/*==================================
   ANALYTICS SECTION (2-COLUMN GRID)
==================================*/

.section-header {
    width: 92%;
    max-width: 1400px;
    margin: 35px auto 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h3 {
    font-size: 22px;
    color: #16215f;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h3 i {
    color: #ffb400;
}

.add-project-btn {
    padding: 10px 20px;
    background: #ffb400;
    color: #16215f;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(255, 180, 0, 0.3);
}

.add-project-btn:hover {
    background: #e6a200;
    transform: translateY(-2px);
}

.analytics-container {
    width: 92%;
    max-width: 1400px;
    margin: 0 auto 45px;
}

.charts-2col-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.chart-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 22px 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    height: 380px;
}

.chart-card h4 {
    font-size: 16px;
    color: #16215f;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-card h4 i {
    color: #ffb400;
}

.canvas-wrapper {
    position: relative;
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 280px;
}

.chart-card canvas {
    width: 100% !important;
    height: 100% !important;
}

/*==================================
   PROJECT RECORDS GRID
==================================*/

.project-container {
    width: 92%;
    max-width: 1400px;
    margin: 0 auto 45px;
}

#recentProjectsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 22px;
}

.project-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.project-card-image {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #16215f;
}

.project-header {
    padding: 18px 20px 10px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.project-header h3 {
    font-size: 18px;
    color: #16215f;
    font-weight: 700;
    line-height: 1.3;
}

.project-body {
    padding: 0 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-info {
    font-size: 13px;
    color: #475569;
    margin-bottom: 12px;
}

.project-info p {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.project-info strong {
    color: #16215f;
}

.description {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-buttons {
    display: flex;
    gap: 10px;

}

.view-btn {
    flex: 1;
    text-align: center;
    padding: 9px;
    background: #16215f;
    color: #ffb400;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s;
}

.view-btn:hover {
    background: #0b1033;
}

.edit-btn {
    padding: 9px 14px;
    background: #f1f5f9;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s;
}

.edit-btn:hover {
    background: #e2e8f0;
    color: #16215f;
}

/*==================================
   RECENT ACTIVITY TABLE
==================================*/

.activity-container {
    width: 92%;
    max-width: 1400px;
    margin: 0 auto 50px;
}

.activity-table-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    overflow-x: auto;
}

.activity-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.activity-table th {
    background: #f8fafc;
    color: #16215f;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
}

.activity-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #334155;
    vertical-align: middle;
}

.activity-table tr:hover {
    background: #f8fafc;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-active, .badge-active {
    background: #dcfce7;
    color: #15803d;
}

.status-pending, .badge-pending {
    background: #fef3c7;
    color: #b45309;
}

.status-ongoing, .badge-ongoing {
    background: #e0f2fe;
    color: #0369a1;
}

.status-completed, .badge-completed {
    background: #dbeafe;
    color: #1e40af;
}

.status-rejected, .badge-rejected {
    background: #fee2e2;
    color: #b91c1c;
}

.table-action-btn {
    padding: 6px 14px;
    background: #16215f;
    color: #ffb400;
    text-decoration: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    transition: 0.2s;
}

.table-action-btn:hover {
    background: #0b1033;
}

.loading-cell, .error-cell {
    text-align: center;
    padding: 30px !important;
    font-size: 15px;
    color: #64748b;
}

/*==================================
            FOOTER
==================================*/

footer {
    background: #0b1033;
    color: #fff;
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
}

footer h3 {
    font-size: 32px;
    margin-bottom: 10px;
}

footer span {
    color: #ffb400;
}

footer p {
    color: #ddd;
    margin-top: 8px;
    font-size: 15px;
}

/* User profile header icon */
.nav-auth-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.nav-profile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
}

.nav-profile-icon i {
    color: #ffb400;
    font-size: 20px;
}

/*==================================
       RESPONSIVE DESIGN
==================================*/

@media (max-width: 1024px) {
    .summary-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-2col-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px;
    }

    .header-right {
        align-items: center;
        width: 100%;
    }

    .search-box {
        width: 100%;
    }

    .search-box input {
        width: 100%;
    }

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

    .chart-card {
        height: 320px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 16px 14px;
    }

    .logo h1 {
        font-size: clamp(24px, 7vw, 32px);
    }

    .top-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .chart-card {
        height: auto;
        min-height: 290px;
        padding: 16px 12px;
    }

    .project-table-card {
        overflow-x: auto;
    }
}