/* ============================================
   PROJECTS PAGE STYLES
   ============================================ */

/* Projects Tabs Wrapper */
.projects-tabs-wrapper {
    margin-bottom: 32px;
    grid-column: 1 / -1;
}

.projects-tabs {
    display: flex;
    gap: 0;
    flex-wrap: nowrap;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
}

.project-tab {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    bottom: -2px;
    flex: 1;
    text-align: center;
    white-space: nowrap;
}

.project-tab:hover {
    color: var(--primary-color);
    background: rgba(0, 77, 64, 0.05);
}

.project-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: transparent;
}

/* Ensure consistent content width */
.ifrs-content-main {
    width: 100%;
    min-width: 0;
}

.projects-intro {
    margin-bottom: 24px;
    padding: 16px 20px;
    background: var(--background-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    width: 100%;
}

.projects-intro p {
    margin: 0;
    font-size: 15px;
    color: var(--text-color);
}

/* Projects Controls */
.projects-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.search-box {
    display: flex;
    gap: 12px;
    flex: 1;
    max-width: 600px;
}

.search-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
    min-width: 200px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-go,
.btn-clear {
    padding: 10px 24px;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
    min-width: 100px;
}

.btn-go:hover,
.btn-clear:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-print {
    padding: 10px 24px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    white-space: nowrap;
    min-width: 140px;
}

.btn-print:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 77, 64, 0.2);
}

/* Projects Table */
.projects-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--white);
    width: 100%;
}

.projects-table {
    width: 100%;
    border-collapse: collapse;
}

.projects-table thead {
    background: var(--background-light);
}

.projects-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.projects-table th.sortable {
    cursor: pointer;
    user-select: none;
}

.projects-table th.sortable:hover {
    background: rgba(0, 77, 64, 0.05);
}

.projects-table th i {
    margin-left: 8px;
    color: var(--text-muted);
    font-size: 12px;
}

.projects-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s;
}

.projects-table tbody tr:hover {
    background: rgba(0, 77, 64, 0.02);
}

.projects-table td {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--text-color);
}

.type-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: var(--white);
    text-align: center;
    min-width: 40px;
}

.type-badge.type-research {
    background: #0369a1;
}

.type-badge.type-development {
    background: #059669;
}

.type-badge.type-implementation {
    background: #7c3aed;
}

.type-badge.type-translation {
    background: #dc2626;
}

.project-title-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.project-title-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.no-projects-row {
    text-align: center;
    padding: 48px 20px !important;
}

.no-projects-row p {
    color: var(--text-muted);
    font-size: 16px;
    margin: 0;
}

/* Table Footer */
.table-footer {
    margin-top: 16px;
    padding: 12px 20px;
    background: var(--background-light);
    border-radius: 4px;
}

.table-footer p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* Sidebar Widgets */
.sidebar-widget {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-title i {
    color: var(--primary-color);
    font-size: 16px;
}

/* Sidebar Links */
.sidebar-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-links li {
    margin-bottom: 12px;
}

.sidebar-links li:last-child {
    margin-bottom: 0;
}

.sidebar-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 14px;
}

.sidebar-links a:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    transform: translateX(4px);
}

.sidebar-links a i {
    font-size: 14px;
    color: var(--primary-color);
    width: 16px;
}

/* Type Legend */
.type-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.legend-label {
    font-size: 14px;
    color: var(--text-color);
}

/* Sidebar CTA */
.sidebar-cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, #008060 100%);
    border: none;
    color: var(--white);
}

.sidebar-cta .widget-title {
    color: var(--white);
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.sidebar-cta .widget-title i {
    color: var(--white);
}

.sidebar-cta p {
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 16px 0;
    font-size: 14px;
    line-height: 1.6;
}

.btn-sidebar {
    display: block;
    width: 100%;
    padding: 12px 20px;
    background: var(--white);
    color: var(--primary-color);
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-sidebar:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .projects-tabs {
        flex-direction: column;
    }
    
    .project-tab {
        width: 100%;
        text-align: left;
    }
    
    .projects-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .btn-print {
        width: 100%;
        justify-content: center;
    }
    
    .projects-table {
        font-size: 13px;
    }
    
    .projects-table th,
    .projects-table td {
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .projects-table th,
    .projects-table td {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .type-badge {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 35px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .btn-go,
    .btn-clear {
        width: 100%;
    }
}
