/* ============================================================
   Gestion Projet Construction - Frontend Styles
   Prefix: .gpc-
   ============================================================ */

/* Container */
.gpc-frontend-container {
    max-width: 1600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    color: #333;
}

/* Header */
.gpc-header {
    margin-bottom: 20px;
}

.gpc-header h2 {
    margin: 0 0 15px;
    font-size: 24px;
    font-weight: 600;
    color: #1e293b;
}

/* Tabs */
.gpc-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid #e2e8f0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.gpc-tabs::-webkit-scrollbar {
    display: none;
}

.gpc-tab {
    padding: 12px 24px;
    border: none;
    background: none;
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 44px;
}

.gpc-tab:hover {
    color: #1B3A5C;
    background: #f8fafc;
}

.gpc-tab.active {
    color: #fff;
    background: #1B3A5C;
    border-bottom-color: #E8A630;
    border-radius: 6px 6px 0 0;
}

/* Content Wrapper — stacked layout (nav bar on top) */
.gpc-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

/* Sidebar (now horizontal nav bar) */
.gpc-sidebar {
    width: 100%;
    flex-shrink: 0;
}

.gpc-sidebar h3 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Navigation (Month/Project) */
.gpc-month-nav,
.gpc-project-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Month/Project Carousel Wrapper (injected by JS) */
.gpc-carousel-wrap {
    position: relative;
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.gpc-carousel-wrap .gpc-month-nav,
.gpc-carousel-wrap .gpc-project-nav {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    gap: 0;
}

.gpc-carousel-wrap .gpc-month-nav::-webkit-scrollbar,
.gpc-carousel-wrap .gpc-project-nav::-webkit-scrollbar {
    display: none;
}

.gpc-carousel-wrap .gpc-month-link,
.gpc-carousel-wrap .gpc-month-link-validated,
.gpc-carousel-wrap .gpc-project-link {
    flex: 0 0 auto;
    border-left: none;
    border-bottom: 2px solid transparent;
    border-right: 1px solid #f0f0f0;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    text-align: center;
    padding: 10px 16px;
    white-space: nowrap;
    scroll-snap-align: start;
}

.gpc-carousel-wrap .gpc-month-link:last-child,
.gpc-carousel-wrap .gpc-month-link-validated:last-child,
.gpc-carousel-wrap .gpc-project-link:last-child {
    border-right: none;
}

.gpc-carousel-wrap .gpc-month-link.active,
.gpc-carousel-wrap .gpc-month-link-validated.active,
.gpc-carousel-wrap .gpc-project-link.active {
    border-left: none;
    border-bottom-color: #E8A630;
}

/* Carousel Arrow Buttons */
.gpc-carousel-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    border: none;
    background: #f7f8fa;
    color: #4a5568;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    z-index: 2;
    padding: 0;
    flex-shrink: 0;
}

.gpc-carousel-arrow:hover {
    background: #e2e8f0;
    color: #1B3A5C;
}

.gpc-carousel-arrow:disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.gpc-carousel-arrow svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gpc-carousel-arrow--left {
    border-right: 1px solid #e2e8f0;
}

.gpc-carousel-arrow--right {
    border-left: 1px solid #e2e8f0;
}

/* Gradient fade indicators */
.gpc-carousel-wrap .gpc-month-nav.can-scroll-right,
.gpc-carousel-wrap .gpc-project-nav.can-scroll-right {
    mask-image: linear-gradient(to right, #000 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent 100%);
}

.gpc-carousel-wrap .gpc-month-nav.can-scroll-left,
.gpc-carousel-wrap .gpc-project-nav.can-scroll-left {
    mask-image: linear-gradient(to left, #000 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, #000 85%, transparent 100%);
}

.gpc-carousel-wrap .gpc-month-nav.can-scroll-both,
.gpc-carousel-wrap .gpc-project-nav.can-scroll-both {
    mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

.gpc-month-link,
.gpc-month-link-validated,
.gpc-project-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}

.gpc-month-link:hover,
.gpc-month-link-validated:hover,
.gpc-project-link:hover {
    background: #f4f6f9;
    color: #1B3A5C;
    text-decoration: none;
}

.gpc-month-link.active,
.gpc-month-link-validated.active,
.gpc-project-link.active {
    background: rgba(232, 166, 48, 0.08);
    color: #1B3A5C;
    border-left-color: #E8A630;
    font-weight: 600;
}

/* Count Badge */
.gpc-month-count,
.gpc-project-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 12px;
    background: #e5e7eb;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.gpc-month-count.has-items,
.gpc-project-count.has-items {
    background: rgba(232, 166, 48, 0.15);
    color: #b8860b;
}

/* Sidebar loading */
.gpc-sidebar-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    gap: 8px;
    color: #6b7280;
    font-size: 13px;
}

/* Folder items in file list */
.gpc-folder-item {
    background: #f8fafc;
    cursor: pointer;
}
.gpc-folder-item:hover {
    background: #eff6ff;
}
.gpc-folder-item .gpc-file-icon {
    font-size: 20px;
}

/* Submissions breadcrumb */
.gpc-submissions-breadcrumb {
    padding: 8px 12px;
    margin-bottom: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    color: #6b7280;
}
.gpc-submissions-breadcrumb .gpc-breadcrumb-item {
    color: #2563eb;
    cursor: pointer;
}
.gpc-submissions-breadcrumb .gpc-breadcrumb-item:hover {
    text-decoration: underline;
}
.gpc-submissions-breadcrumb .gpc-breadcrumb-sep {
    margin: 0 6px;
    color: #9ca3af;
}
.gpc-submissions-breadcrumb .gpc-breadcrumb-current {
    color: #374151;
    font-weight: 600;
}

/* Loading dot */
.gpc-loading-dot {
    width: 6px;
    height: 6px;
    background: #94a3b8;
    border-radius: 50%;
    display: inline-block;
    animation: gpc-pulse 1.4s infinite;
}

@keyframes gpc-pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Main Content */
.gpc-main {
    flex: 1;
    min-width: 0;
}

/* Empty State */
.gpc-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 15px;
}

/* Loading */
.gpc-loading {
    text-align: center;
    padding: 60px 20px;
}

.gpc-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: gpc-spin 0.8s linear infinite;
    margin: 0 auto 15px;
}
.gpc-spinner-inline {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: gpc-spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes gpc-spin {
    to { transform: rotate(360deg); }
}

/* File List */
.gpc-file-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gpc-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.gpc-file-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.gpc-file-icon {
    font-size: 24px;
    width: 36px;
    text-align: center;
    flex-shrink: 0;
}

.gpc-file-details {
    flex: 1;
    min-width: 0;
}

.gpc-file-name {
    font-size: 14px;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gpc-file-meta {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

.gpc-file-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Buttons */
.gpc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    text-decoration: none;
    min-height: 40px;
}

.gpc-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    text-decoration: none;
    color: #374151;
}

.gpc-btn-sm {
    padding: 5px 10px;
    font-size: 12px;
}

.gpc-btn-xs {
    padding: 2px 6px;
    font-size: 11px;
    border-radius: 4px;
}

/* Multi-file display in submissions table */
.gpc-multi-files {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gpc-multi-file-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.gpc-multi-file-name {
    word-break: break-all;
}

.gpc-btn-primary {
    background: #E8A630;
    border-color: #E8A630;
    color: #1B3A5C;
    font-weight: 600;
}

.gpc-btn-primary:hover {
    background: #D4921C;
    border-color: #D4921C;
    color: #1B3A5C;
}

.gpc-btn-primary:disabled {
    background: #f0d68a;
    border-color: #f0d68a;
    cursor: not-allowed;
    color: #8a7340;
}

.gpc-btn-link {
    background: none;
    border: none;
    color: #2563eb;
    padding: 5px 8px;
}

.gpc-btn-link:hover {
    color: #1d4ed8;
    background: #eff6ff;
    text-decoration: none;
}

.gpc-btn-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 14px;
}

.gpc-btn-close:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* Viewer */
.gpc-viewer {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.gpc-viewer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

.gpc-viewer-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gpc-viewer-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.gpc-viewer-info span {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* PDF Container */
.gpc-pdf-container {
    position: relative;
    width: 100%;
    min-height: 500px;
    max-height: 90vh;
    background: #525659;
    border: 1px solid #ddd;
    padding: 20px;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.gpc-pdf-container canvas {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background: white;
}

/* PDF Controls */
.gpc-pdf-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-top: none;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 14px;
}

/* Viewer Actions */
.gpc-viewer-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid #e2e8f0;
}

/* Archives */
.gpc-archives-wrapper {
    margin-top: 20px;
}

/* Breadcrumb */
.gpc-breadcrumb {
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.gpc-breadcrumb-item {
    color: #2563eb;
    cursor: pointer;
    font-weight: 500;
}

.gpc-breadcrumb-item:hover {
    text-decoration: underline;
}

.gpc-breadcrumb-sep {
    color: #94a3b8;
    margin: 0 4px;
}

/* Archive Folder Grid */
.gpc-archives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.gpc-archive-folder {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
    text-align: center;
}

.gpc-archive-folder:hover {
    background: #f0f6ff;
    border-color: #93c5fd;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.1);
}

.gpc-archive-folder-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.gpc-archive-folder-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.gpc-archive-folder-count {
    font-size: 12px;
    color: #94a3b8;
}

/* Modal */
.gpc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gpc-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.gpc-modal-container {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: gpc-modal-in 0.2s ease-out;
}

@keyframes gpc-modal-in {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.gpc-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.gpc-modal-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.gpc-modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.gpc-modal-close:hover {
    color: #ef4444;
    background: #fef2f2;
}

.gpc-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.gpc-modal-body p {
    margin: 0 0 10px;
    font-size: 14px;
    color: #475569;
}

.gpc-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0;
}

/* Form Elements */
.gpc-form-group {
    margin-top: 15px;
}

.gpc-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    margin-bottom: 5px;
}

.gpc-textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}

.gpc-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Toast Notifications */
#gpc-toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gpc-toast {
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s, transform 0.3s;
    max-width: 400px;
}

.gpc-toast-show {
    opacity: 1;
    transform: translateX(0);
}

.gpc-toast-success {
    background: #16a34a;
}

.gpc-toast-error {
    background: #dc2626;
}

.gpc-toast-info {
    background: #2563eb;
}

.gpc-toast-warning {
    background: #d97706;
}

/* ============================================================
   Soumissions Recues (n8n) Tab
   ============================================================ */

/* Tab Badge */
.gpc-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    margin-left: 6px;
    vertical-align: middle;
}

.gpc-tab-badge:empty {
    display: none;
}

/* Received Wrapper */
.gpc-received-wrapper {
    margin-top: 20px;
}

/* Filters Bar */
.gpc-received-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.gpc-status-filters {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.gpc-status-filter {
    padding: 6px 14px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
}

.gpc-status-filter:hover {
    border-color: #E8A630;
    color: #1B3A5C;
    background: rgba(232, 166, 48, 0.06);
}

.gpc-status-filter.active {
    background: #1B3A5C;
    border-color: #1B3A5C;
    color: #fff;
}

.gpc-status-filter .gpc-filter-count {
    margin-left: 4px;
    font-size: 11px;
    opacity: 0.8;
}

.gpc-received-search {
    margin-left: auto;
}

.gpc-received-search input {
    padding: 7px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    width: 220px;
    transition: border-color 0.15s;
}

.gpc-received-search input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Submission List */
.gpc-received-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gpc-received-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.gpc-received-item:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.gpc-received-item.status-EN_ATTENTE {
    border-left-color: #f59e0b;
}

.gpc-received-item.status-VALIDEE {
    border-left-color: #22c55e;
}

.gpc-received-item.status-REJETEE {
    border-left-color: #ef4444;
}

.gpc-received-item.status-BC_GENERE {
    border-left-color: #3b82f6;
}

.gpc-received-item-main {
    flex: 1;
    min-width: 0;
}

.gpc-received-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gpc-received-item-meta {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.gpc-received-item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.gpc-received-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.gpc-received-item-total {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
}

.gpc-received-item-alert {
    color: #f59e0b;
    font-size: 18px;
    cursor: help;
}

/* Badges */
.gpc-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.gpc-badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.gpc-badge-success {
    background: #dcfce7;
    color: #166534;
}

.gpc-badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.gpc-badge-info {
    background: #dbeafe;
    color: #1e40af;
}
.gpc-badge-archive {
    background: #e0e7ff;
    color: #3730a3;
}

.gpc-btn-archive {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}
.gpc-btn-archive:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    color: white;
}
.gpc-btn-archive:disabled {
    background: #a5b4fc;
    border-color: #a5b4fc;
    color: white;
}

/* Pagination */
.gpc-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 20px;
    padding: 12px 0;
}

.gpc-pagination button {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: all 0.15s;
}

.gpc-pagination button:hover:not(:disabled) {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #2563eb;
}

.gpc-pagination button.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.gpc-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Detail View */
.gpc-received-detail {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
}

.gpc-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.gpc-detail-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

/* Detail Cards Grid */
.gpc-detail-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.gpc-detail-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
}

.gpc-detail-card h4 {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gpc-detail-card p {
    margin: 0 0 6px;
    font-size: 13px;
    color: #374151;
    line-height: 1.5;
}

.gpc-detail-card p strong {
    color: #1e293b;
    font-weight: 600;
}

.gpc-detail-card .gpc-confidence {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.gpc-confidence-high {
    background: #dcfce7;
    color: #166534;
}

.gpc-confidence-medium {
    background: #fef3c7;
    color: #92400e;
}

.gpc-confidence-low {
    background: #fee2e2;
    color: #991b1b;
}

/* Alert Box */
.gpc-detail-alertes {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 24px;
}

.gpc-detail-alertes h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
}

.gpc-detail-alertes ul {
    margin: 0;
    padding: 0 0 0 18px;
    list-style: disc;
}

.gpc-detail-alertes li {
    font-size: 13px;
    color: #78350f;
    margin-bottom: 4px;
    line-height: 1.5;
}

/* Lines Table */
.gpc-lines-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 13px;
}

.gpc-lines-table thead th {
    background: #f1f5f9;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #e2e8f0;
}

.gpc-lines-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}

.gpc-lines-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.gpc-lines-table tbody tr:hover {
    background: #eff6ff;
}

.gpc-lines-table tbody td {
    padding: 10px 12px;
    color: #374151;
    vertical-align: top;
}

.gpc-lines-table .gpc-col-num {
    width: 40px;
    text-align: center;
    color: #94a3b8;
    font-weight: 600;
}

.gpc-lines-table .gpc-col-money {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Totals Box */
.gpc-totaux-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.gpc-totaux-box {
    min-width: 280px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
}

.gpc-totaux-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    color: #475569;
}

.gpc-totaux-row.gpc-totaux-total {
    border-top: 2px solid #e2e8f0;
    margin-top: 6px;
    padding-top: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

.gpc-totaux-row .gpc-totaux-label {
    font-weight: 500;
}

.gpc-totaux-row .gpc-totaux-value {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* Maestro Info */
.gpc-maestro-info {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 24px;
}

.gpc-maestro-info h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: #166534;
}

.gpc-maestro-info p {
    margin: 0 0 4px;
    font-size: 13px;
    color: #15803d;
}

.gpc-maestro-info .gpc-missing-fields {
    color: #dc2626;
    font-weight: 500;
}

/* Validation Actions */
.gpc-validation-actions {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.gpc-validation-actions h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.gpc-validation-actions .gpc-textarea {
    margin-bottom: 14px;
}

.gpc-validation-buttons {
    display: flex;
    gap: 10px;
}

.gpc-btn-danger {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.gpc-btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.gpc-btn-success {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.gpc-btn-success:hover {
    background: #15803d;
    border-color: #15803d;
    color: #fff;
}

.gpc-bc-pending {
    font-style: italic;
    font-size: 12px;
}

/* Validation Info (for already validated/rejected) */
.gpc-validation-info {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.gpc-validation-info p {
    margin: 0 0 4px;
    font-size: 13px;
    color: #475569;
}

.gpc-validation-info strong {
    color: #1e293b;
}

/* Validation Progress Steps */
.gpc-progress-steps {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.gpc-progress-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: 14px;
    color: #94a3b8;
}

.gpc-progress-step + .gpc-progress-step {
    border-top: 1px solid #f1f5f9;
}

.gpc-progress-step .gpc-step-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 14px;
}

.gpc-progress-step.pending .gpc-step-icon {
    background: #f1f5f9;
    color: #94a3b8;
}

.gpc-progress-step.active .gpc-step-icon {
    background: #dbeafe;
    color: #2563eb;
}

.gpc-progress-step.done .gpc-step-icon {
    background: #dcfce7;
    color: #16a34a;
}

.gpc-progress-step.error .gpc-step-icon {
    background: #fee2e2;
    color: #dc2626;
}

.gpc-progress-step.active {
    color: #2563eb;
    font-weight: 500;
}

.gpc-progress-step.done {
    color: #16a34a;
}

.gpc-progress-step.error {
    color: #dc2626;
}

.gpc-step-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #93c5fd;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: gpc-spin 0.8s linear infinite;
}

/* BC PDF Viewer */
.gpc-bc-viewer {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}

.gpc-bc-viewer h4 {
    margin: 0;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.gpc-bc-pdf-container {
    position: relative;
    width: 100%;
    min-height: 400px;
    max-height: 70vh;
    background: #525659;
    padding: 20px;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.gpc-bc-pdf-container canvas {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background: white;
}

.gpc-bc-pdf-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    background: #f5f5f5;
    border-top: 1px solid #e2e8f0;
    font-size: 13px;
    color: #475569;
}

/* Utility Classes */
.gpc-text-right {
    text-align: right;
}

.gpc-text-muted {
    color: #94a3b8;
}

.gpc-text-danger {
    color: #ef4444;
}

.gpc-text-success {
    color: #16a34a;
}

.gpc-mt-0 { margin-top: 0; }
.gpc-mb-0 { margin-bottom: 0; }

/* Responsive — Tablet */
@media (max-width: 992px) {
    /* Carousel arrows compact on tablet */
    .gpc-carousel-arrow {
        width: 28px;
        min-width: 28px;
    }

    .gpc-detail-cards {
        grid-template-columns: 1fr;
    }
}

/* Responsive — Mobile */
@media (max-width: 600px) {
    .gpc-tabs {
        overflow-x: auto;
        scrollbar-width: none;
    }

    .gpc-tabs::-webkit-scrollbar {
        display: none;
    }

    .gpc-tab {
        white-space: nowrap;
        flex-shrink: 0;
        min-height: 44px;
    }

    .gpc-viewer-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .gpc-archives-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gpc-file-item {
        flex-wrap: wrap;
    }

    .gpc-file-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .gpc-received-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .gpc-received-search {
        margin-left: 0;
    }

    .gpc-received-search input {
        width: 100%;
    }

    .gpc-received-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .gpc-received-item-right {
        width: 100%;
        justify-content: space-between;
    }

    .gpc-lines-table {
        display: block;
        overflow-x: auto;
    }

    .gpc-validation-buttons {
        flex-direction: column;
    }

    .gpc-totaux-box {
        min-width: 100%;
    }
}

/* =========================================================================
   SUPPLIERS MODULE - Design epure
   ========================================================================= */

.gpc-suppliers-wrapper {
    padding: 8px 0;
}

/* Header */
.gpc-suppliers-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.gpc-suppliers-title {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.gpc-suppliers-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.gpc-suppliers-stats {
    display: flex;
    gap: 8px;
}

.gpc-stat-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    background: #f1f5f9;
    color: #64748b;
}

.gpc-stat-active {
    background: #dcfce7;
    color: #166534;
}

.gpc-stat-inactive {
    background: #fee2e2;
    color: #991b1b;
}

/* Filter bar */
.gpc-suppliers-filterbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.gpc-search-input-wrapper {
    position: relative;
    flex: 1;
    min-width: 240px;
}

.gpc-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.gpc-search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    color: #1e293b;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.gpc-search-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.gpc-search-input::placeholder {
    color: #94a3b8;
}

/* Toggle switch */
.gpc-suppliers-toggle-wrapper {
    flex-shrink: 0;
}

.gpc-switch-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #475569;
    user-select: none;
}

.gpc-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.gpc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.gpc-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    border-radius: 24px;
    transition: background 0.2s;
}

.gpc-switch-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.gpc-switch input:checked + .gpc-switch-slider {
    background: #2563eb;
}

.gpc-switch input:checked + .gpc-switch-slider::before {
    transform: translateX(20px);
}

/* Empty state */
.gpc-empty-hint {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 4px;
}

/* Suppliers grid */
.gpc-suppliers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

/* Supplier card */
.gpc-supplier-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.gpc-supplier-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.gpc-supplier-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 0;
    gap: 10px;
}

.gpc-supplier-code {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 6px;
    letter-spacing: 0.3px;
}

.gpc-supplier-card-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
}

.gpc-supplier-card-status.active {
    color: #16a34a;
}

.gpc-supplier-card-status.active::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
}

.gpc-supplier-card-status.inactive {
    color: #94a3b8;
}

.gpc-supplier-card-status.inactive::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cbd5e1;
}

.gpc-supplier-card-body {
    padding: 12px 18px 14px;
}

.gpc-supplier-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
    line-height: 1.3;
}

.gpc-supplier-info-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
    line-height: 1.4;
}

.gpc-supplier-info-line svg {
    flex-shrink: 0;
    opacity: 0.5;
}

.gpc-supplier-info-line a {
    color: #2563eb;
    text-decoration: none;
}

.gpc-supplier-info-line a:hover {
    text-decoration: underline;
}

.gpc-supplier-specialite-tag {
    display: inline-flex;
    padding: 2px 10px;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    margin-top: 6px;
}

.gpc-supplier-card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    padding: 10px 18px;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}

.gpc-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
    color: #64748b;
}

.gpc-btn-icon:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #2563eb;
}

.gpc-btn-icon-danger:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #dc2626;
}

/* Input fields */
.gpc-input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.gpc-input:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.gpc-input::placeholder {
    color: #94a3b8;
}

select.gpc-input {
    min-height: 44px;
    padding: 10px 12px;
    line-height: 1.4;
    cursor: pointer;
}

select.gpc-input option {
    padding: 8px 12px;
    font-size: 14px;
}

/* Form grid 2 columns */
.gpc-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.gpc-required {
    color: #dc2626;
}

/* Modal wide variant */
.gpc-modal-wide {
    max-width: 900px;
}

/* Text danger */
.gpc-text-danger {
    color: #dc2626;
    font-size: 13px;
}

/* Button danger */
.gpc-btn-danger {
    background: #dc2626;
    color: #fff;
    border-color: #dc2626;
}

.gpc-btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

/* Pagination */
.gpc-suppliers-wrapper .gpc-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.gpc-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.gpc-page-btn:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #2563eb;
}

.gpc-page-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

.gpc-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.gpc-page-info {
    font-size: 13px;
    color: #94a3b8;
    padding: 0 8px;
}

/* Responsive suppliers */
@media (max-width: 1024px) {
    .gpc-suppliers-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 640px) {
    .gpc-suppliers-header {
        flex-direction: column;
        align-items: stretch;
    }

    .gpc-suppliers-filterbar {
        flex-direction: column;
    }

    .gpc-suppliers-grid {
        grid-template-columns: 1fr;
    }

    .gpc-form-grid {
        grid-template-columns: 1fr;
    }

    .gpc-modal-wide {
        max-width: calc(100vw - 32px);
    }
}

/* =========================================================================
   PROJECTS TAB
   ========================================================================= */

.gpc-projects-wrapper {
    padding: 8px 0;
}

.gpc-projects-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.gpc-projects-title {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.gpc-projects-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.gpc-projects-stats {
    display: flex;
    gap: 8px;
}

.gpc-projects-filterbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.gpc-projects-toggle-wrapper {
    flex-shrink: 0;
}

.gpc-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.gpc-project-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.gpc-project-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.gpc-project-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 0;
    gap: 10px;
}

.gpc-project-code {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 6px;
    letter-spacing: 0.3px;
}

.gpc-project-card-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
}

.gpc-project-card-status.active {
    color: #16a34a;
}

.gpc-project-card-status.active::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
}

.gpc-project-card-status.inactive {
    color: #94a3b8;
}

.gpc-project-card-status.inactive::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cbd5e1;
}

.gpc-project-card-body {
    padding: 12px 18px 14px;
}

.gpc-project-name {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
    line-height: 1.3;
}

.gpc-project-info-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
    line-height: 1.4;
}

.gpc-project-info-line svg {
    flex-shrink: 0;
    opacity: 0.5;
}

.gpc-project-card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    padding: 10px 18px;
    border-top: 1px solid #f1f5f9;
    background: #fafbfc;
}

.gpc-projects-wrapper .gpc-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* Responsive projects */
@media (max-width: 1024px) {
    .gpc-projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 640px) {
    .gpc-projects-header {
        flex-direction: column;
        align-items: stretch;
    }

    .gpc-projects-filterbar {
        flex-direction: column;
    }

    .gpc-projects-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   TENDERS (APPELS D'OFFRES) TAB
   ========================================================================= */

.gpc-tenders-wrapper {
    padding: 8px 0;
}

.gpc-tenders-stats {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.gpc-tenders-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.gpc-tenders-status-filters {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.gpc-tenders-search {
    flex: 1;
    min-width: 200px;
}

.gpc-toggle-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #475569;
    white-space: nowrap;
    padding: 6px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    transition: all 0.15s;
    user-select: none;
}
.gpc-toggle-filter:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}
.gpc-toggle-filter input:checked + span {
    color: #1d4ed8;
    font-weight: 600;
}
.gpc-toggle-filter:has(input:checked) {
    border-color: #93c5fd;
    background: #eff6ff;
}

.gpc-tenders-search input {
    width: 100%;
    padding: 7px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.gpc-tenders-search input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Badge default */
.gpc-badge-default {
    background: #f1f5f9;
    color: #475569;
}

/* ---- Tenders list (row-based layout) ---- */
.gpc-tenders-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gpc-tender-row {
    display: grid;
    grid-template-columns: 100px 110px 90px 1fr 140px 150px 150px;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
    font-size: 13px;
}

.gpc-tender-row:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.gpc-tender-row-status {
    display: flex;
    align-items: center;
}

.gpc-tender-row-ref {
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gpc-tender-row-project {
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
    font-size: 12px;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.gpc-tender-row-title {
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.gpc-tender-row-counts {
    display: flex;
    gap: 10px;
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

.gpc-tender-row-date {
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

.gpc-tender-row-author {
    font-size: 13px;
    font-weight: 500;
    color: #1e293b;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive tenders list */
@media (max-width: 1200px) {
    .gpc-tender-row {
        grid-template-columns: 90px 100px 80px 1fr 120px 130px;
    }
    .gpc-tender-row-author {
        display: none;
    }
}

@media (max-width: 900px) {
    .gpc-tender-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .gpc-tender-row-status {
        order: -1;
    }
    .gpc-tender-row-author {
        display: block;
        text-align: left;
    }
}

/* Search box component */
.gpc-searchbox {
    position: relative;
}

.gpc-searchbox-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 260px;
    overflow-y: auto;
}

.gpc-searchbox-item {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}

.gpc-searchbox-item:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.gpc-searchbox-item:last-child {
    border-bottom: none;
}

.gpc-searchbox-empty {
    padding: 12px 14px;
    font-size: 13px;
    color: #94a3b8;
    text-align: center;
}

.gpc-searchbox-selected {
    margin-top: 6px;
}

/* Tags */
.gpc-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin: 3px 4px 3px 0;
    white-space: nowrap;
}

.gpc-tag-remove {
    background: none;
    border: none;
    color: #60a5fa;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0 2px;
    transition: color 0.15s;
}

.gpc-tag-remove:hover {
    color: #dc2626;
}

.gpc-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 6px;
    min-height: 0;
}

/* Table responsive */
.gpc-table-responsive {
    overflow-x: auto;
    margin-bottom: 16px;
}

/* Detail actions */
.gpc-detail-actions {
    margin-top: 20px;
    padding: 16px 0;
    border-top: 1px solid #e2e8f0;
}

.gpc-action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Detail lines section heading */
.gpc-detail-lines {
    margin-bottom: 20px;
}

.gpc-detail-lines h4 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

/* Tender-specific detail styling reuses .gpc-received-detail */

/* Tender items table (modal) */
.gpc-tender-items-wrapper {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.gpc-tender-items-table-scroll {
    overflow-x: auto;
}

.gpc-tender-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.gpc-tender-items-table thead th {
    background: #f8fafc;
    padding: 8px 6px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.gpc-tender-items-table tbody td {
    padding: 4px 4px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.gpc-ti-col-num { width: 35px; text-align: center; }
.gpc-ti-col-code { width: 220px; }
.gpc-ti-col-desc { min-width: 200px; }
.gpc-ti-col-qty { width: 80px; }
.gpc-ti-col-unit { width: 80px; }
.gpc-ti-col-actions { width: 30px; text-align: center; }

.gpc-item-line-num {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    border-radius: 4px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 600;
    font-size: 12px;
}

.gpc-input-sm {
    padding: 5px 8px !important;
    font-size: 13px !important;
    min-height: auto !important;
}

.gpc-tender-items-table .gpc-item-description {
    width: 100%;
    resize: vertical;
    min-height: 32px;
}

.gpc-tender-items-table .gpc-item-qty,
.gpc-tender-items-table .gpc-item-unit {
    width: 100%;
}

.gpc-btn-remove-item {
    background: none;
    border: none;
    font-size: 18px;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 4px;
}

.gpc-btn-remove-item:hover {
    color: #ef4444;
    background: #fef2f2;
}

.gpc-searchbox-inline {
    position: relative;
}

.gpc-searchbox-inline .gpc-activity-results {
    position: fixed;
    z-index: 999999;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,.18);
    max-height: 350px;
    min-width: 320px;
    overflow-y: auto;
}

.gpc-activity-results .gpc-searchbox-item {
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
}

.gpc-activity-results .gpc-searchbox-item:hover {
    background: #eff6ff;
}

.gpc-activity-results .gpc-searchbox-empty {
    padding: 8px 10px;
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
}

#btn-add-tender-item {
    margin: 8px 12px;
    font-size: 13px;
}

/* Tender items in detail view */
#tender-items-section {
    margin-bottom: 24px;
}

#tender-items-section h4 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

/* Responsive tenders */
@media (max-width: 768px) {
    .gpc-tenders-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .gpc-tenders-search {
        min-width: 100%;
    }

    .gpc-action-buttons {
        flex-direction: column;
    }

    .gpc-ti-col-code { width: 160px; }
}

/* =========================================================================
   SUPPLIER PORTAL (integrated tab)
   ========================================================================= */

/* Portal mode: centered, clean layout - hide all normal tabs */
.gpc-portal-mode {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* Override OceanWP wide container for portal landing page */
body .gpc-portal-mode .container,
.gpc-portal-mode .container {
    width: 100% !important;
    max-width: 900px !important;
}

.gpc-portal-mode .gpc-tab-content:not(#tab-portal) {
    display: none !important;
}

.gpc-portal-mode #tab-portal {
    display: block !important;
}

.gpc-portal-wrapper {
    padding: 20px 0;
}

.gpc-portal-header {
    text-align: center;
    margin-bottom: 32px;
}

.gpc-portal-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px;
}

.gpc-portal-subtitle {
    font-size: 16px;
    color: #64748b;
    margin: 0;
}

/* Portal states */
.gpc-portal-error,
.gpc-portal-expired {
    text-align: center;
    padding: 40px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
}

.gpc-portal-error h2,
.gpc-portal-expired h2 {
    color: #991b1b;
    font-size: 20px;
    margin: 0 0 12px;
}

.gpc-portal-error p,
.gpc-portal-expired p {
    color: #7f1d1d;
    font-size: 14px;
    margin: 0 0 8px;
}

.gpc-portal-submitted {
    text-align: center;
    padding: 40px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    margin-bottom: 24px;
}

.gpc-portal-submitted h2 {
    color: #1e40af;
    font-size: 20px;
    margin: 0 0 16px;
}

.gpc-portal-submission-info {
    text-align: left;
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.gpc-portal-submission-info p {
    margin: 0 0 6px;
    font-size: 14px;
    color: #374151;
}

/* Portal info cards */
.gpc-portal-info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.gpc-portal-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
}

.gpc-portal-card h3 {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gpc-portal-card p {
    margin: 0 0 6px;
    font-size: 14px;
    color: #374151;
}

.gpc-portal-card p strong {
    color: #1e293b;
    font-weight: 600;
}

.gpc-portal-card-deadline {
    background: #fffbeb;
    border-color: #fde68a;
}

.gpc-portal-deadline-date {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1e293b !important;
}

.gpc-portal-days-left {
    font-size: 14px;
    color: #92400e !important;
    font-weight: 500;
}

.gpc-portal-days-left.gpc-portal-urgent {
    color: #dc2626 !important;
}

/* Portal items section */
.gpc-portal-items-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.gpc-portal-items-section h3 {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

/* Upload section */
.gpc-portal-upload-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
}

.gpc-portal-upload-section h3 {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

/* Dropzone - uses <label> for native file picker on all devices */
.gpc-portal-dropzone {
    display: block;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 20px;
    -webkit-tap-highlight-color: transparent;
}

.gpc-portal-dropzone:hover,
.gpc-portal-dropzone-active {
    border-color: #2563eb;
    background: #eff6ff;
}

.gpc-portal-dropzone-content p {
    margin: 8px 0 0;
    font-size: 14px;
    color: #64748b;
}

.gpc-portal-browse {
    color: #2563eb;
    font-weight: 500;
    cursor: pointer;
}

.gpc-portal-dropzone-hint {
    font-size: 12px !important;
    color: #94a3b8 !important;
}

/* Selected file */
.gpc-portal-file-selected {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    margin-bottom: 20px;
}

#portal-file-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #166534;
}

#portal-file-size {
    font-size: 12px;
    color: #64748b;
}

.gpc-portal-btn-remove {
    background: none;
    border: none;
    font-size: 20px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
}

.gpc-portal-btn-remove:hover {
    color: #ef4444;
}

/* Portal form fields */
.gpc-portal-form-fields {
    margin-bottom: 24px;
}

/* Progress bar */
.gpc-portal-progress {
    margin-bottom: 20px;
}

.gpc-portal-progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.gpc-portal-progress-fill {
    height: 100%;
    background: #2563eb;
    border-radius: 4px;
    transition: width 0.3s;
    width: 0%;
}

#portal-progress-text {
    font-size: 13px;
    color: #64748b;
}

/* Submit button full width */
.gpc-portal-btn-submit {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
}

/* Success state */
.gpc-portal-success {
    text-align: center;
    padding: 60px 20px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 12px;
}

.gpc-portal-success h2 {
    color: #166534;
    font-size: 22px;
    margin: 16px 0 12px;
}

.gpc-portal-success p {
    color: #15803d;
    font-size: 14px;
    margin: 0 0 8px;
}

/* Portal responsive */
@media (max-width: 768px) {
    .gpc-portal-info-cards {
        grid-template-columns: 1fr;
    }

    .gpc-portal-upload-section {
        padding: 20px;
    }
}

/* ========================================
   PORTAL BC SIGNING
   ======================================== */

.gpc-portal-signing {
    max-width: 900px;
    margin: 0 auto;
}

/* PDF Viewer */
.gpc-signing-pdf-viewer {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 24px;
    overflow: hidden;
}

.gpc-signing-pdf-container {
    text-align: center;
    padding: 16px;
    min-height: 400px;
    overflow-x: auto;
    background: #e5e7eb;
}

.gpc-signing-pdf-container canvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.gpc-signing-pdf-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
}

/* Signature section */
.gpc-signing-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.gpc-signing-section h3 {
    margin: 0 0 16px;
    font-size: 18px;
    color: #1e293b;
}

/* Signer fields */
.gpc-signing-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 20px 0;
}

/* Submit button */
.gpc-signing-submit {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
}

.gpc-signing-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Progress */
.gpc-signing-progress {
    text-align: center;
    padding: 40px;
}

.gpc-signing-progress p {
    margin-top: 12px;
    color: #475569;
}

/* Already signed */
.gpc-portal-already-signed {
    text-align: center;
    padding: 60px 30px;
}

.gpc-portal-already-signed h2 {
    color: #2196F3;
    margin: 16px 0 8px;
}

.gpc-portal-already-signed p {
    color: #475569;
    font-size: 14px;
    margin: 0 0 8px;
}

/* ---- Tender Attachments ---- */
.gpc-tender-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 10px;
}
.gpc-tender-dropzone:hover {
    border-color: #f97316;
    background: rgba(249, 115, 22, 0.04);
}
.gpc-tender-dropzone.dragover {
    border-color: #f97316;
    background: rgba(249, 115, 22, 0.08);
    border-style: solid;
}
.gpc-tender-dropzone .gpc-dropzone-content {
    pointer-events: none;
}
.gpc-tender-dropzone .gpc-dropzone-content a {
    pointer-events: auto;
}

.gpc-tender-attachments {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gpc-attachment-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    flex-wrap: wrap;
}

.gpc-attachment-item.gpc-attachment-new {
    border-color: #93c5fd;
    background: #eff6ff;
}

.gpc-attachment-info {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    min-width: 0;
}

.gpc-attachment-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.gpc-attachment-name {
    font-weight: 500;
    font-size: 13px;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px;
}

.gpc-attachment-size {
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
}

.gpc-attachment-desc {
    flex: 1;
    min-width: 0;
}

.gpc-attachment-desc span {
    font-size: 13px;
}

.gpc-attachment-desc-input {
    flex: 1;
    min-width: 150px;
}

.gpc-attachment-desc-input .gpc-input {
    font-size: 13px;
    padding: 4px 8px;
    width: 100%;
}

.gpc-attachment-remove {
    flex-shrink: 0;
    padding: 2px 8px !important;
    font-size: 16px;
    line-height: 1;
}

.gpc-attachment-upload-section {
    margin-top: 10px;
}

.gpc-attachment-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    background: #f1f5f9;
    border: 1px dashed #94a3b8;
    border-radius: 6px;
    cursor: pointer;
    color: #475569;
    transition: all 0.15s;
}

.gpc-attachment-upload-btn:hover {
    background: #e2e8f0;
    border-color: #64748b;
    color: #1e293b;
}

/* Responsive */
@media (max-width: 768px) {
    .gpc-signing-fields {
        grid-template-columns: 1fr;
    }

    .gpc-signing-section {
        padding: 16px;
    }

    .gpc-attachment-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .gpc-attachment-name {
        max-width: 100%;
    }

    .gpc-attachment-desc-input {
        width: 100%;
    }
}

/* ============================================================
   BC Express Tab
   ============================================================ */

.gpc-bc-express-wrapper {
    max-width: 100%;
    padding: 20px 0;
}

/* BC Express history — compact layout */
#bce-history-table {
    font-size: 12.5px;
}

#bce-history-table th {
    padding: 8px 10px;
    white-space: nowrap;
}

#bce-history-table td {
    padding: 7px 10px;
}

#bce-history-table .bce-actions-cell .gpc-btn-sm {
    padding: 3px 7px;
    font-size: 11px;
}

#bce-supplier-selected .gpc-tag {
    display: inline-flex;
    align-items: center;
}

.gpc-file-upload-zone {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

/* Drag & Drop zone */
.gpc-dropzone {
    border: 2px dashed #CBD5E1;
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    background: #FAFBFC;
    transition: all 0.2s ease;
    cursor: pointer;
}
.gpc-dropzone:hover {
    border-color: #2E75B6;
    background: #F0F7FF;
}
.gpc-dropzone.gpc-dropzone-active {
    border-color: #2E75B6;
    background: #E8F0FE;
    border-style: solid;
    box-shadow: 0 0 0 3px rgba(46, 117, 182, 0.15);
}
.gpc-dropzone.gpc-dropzone-reject {
    border-color: #E74C3C;
    background: #FFF5F5;
}
.gpc-dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.gpc-dropzone-text {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}
.gpc-dropzone-or {
    font-size: 12px;
    color: #94A3B8;
    margin: 2px 0;
}
.gpc-dropzone-hint {
    font-size: 11px;
    color: #94A3B8;
    margin-top: 6px;
}
.gpc-dropzone-file {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.gpc-dropzone-file #btn-bce-file-remove {
    padding: 2px 8px;
    font-size: 14px;
    line-height: 1;
    min-width: auto;
}

#bce-result .gpc-alert {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
}

#bce-result .gpc-alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

#bce-result .gpc-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.gpc-alert-warning {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    margin-bottom: 12px;
}


.bce-history-section {
    margin-top: 10px;
}

#bce-history-table .bce-actions-cell {
    white-space: nowrap;
}

#bce-history-table .bce-actions-cell .gpc-btn-sm {
    margin-right: 4px;
    margin-bottom: 2px;
}

/* =========================================================================
   PURCHASE ORDERS TAB (Bons de Commande)
   ========================================================================= */

.gpc-po-wrapper {
    padding: 0;
}

.gpc-po-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.gpc-po-title {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.gpc-po-stats {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.gpc-po-montant-total {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
}

.gpc-po-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.gpc-po-status-filters {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.gpc-po-table-header,
.gpc-po-row {
    display: grid;
    grid-template-columns: 90px 140px 1fr 90px 110px 130px 110px 110px;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    font-size: 13px;
}

.gpc-po-table-header {
    font-weight: 700;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.gpc-po-row {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
    margin-bottom: 4px;
}

.gpc-po-row:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.gpc-po-row-deleted {
    opacity: 0.5;
    background: #FEF2F2 !important;
}
.gpc-po-row-deleted .gpc-po-cell-numero,
.gpc-po-row-deleted .gpc-po-cell-supplier,
.gpc-po-row-deleted .gpc-po-cell-montant {
    text-decoration: line-through;
}

.gpc-po-cell-numero {
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gpc-po-cell-supplier {
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gpc-po-cell-project code {
    font-size: 12px;
    color: #475569;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
}

.gpc-po-cell-montant {
    text-align: right;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
}

.gpc-po-cell-created-by {
    color: #475569;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gpc-po-cell-source {
    text-align: center;
}

.gpc-po-cell-date {
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

/* Detail grid */
.gpc-po-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.gpc-po-detail-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
}

.gpc-po-detail-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.gpc-po-detail-value {
    display: block;
    font-size: 14px;
    color: #1e293b;
    word-break: break-word;
}

.gpc-po-detail-value a {
    color: #2563eb;
    text-decoration: none;
}

.gpc-po-detail-value a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1100px) {
    .gpc-po-table-header,
    .gpc-po-row {
        grid-template-columns: 80px 120px 1fr 100px 100px;
    }
    .gpc-po-cell-created-by,
    .gpc-po-cell-source,
    .gpc-po-cell-date,
    .gpc-po-table-header span:nth-child(6),
    .gpc-po-table-header span:nth-child(7),
    .gpc-po-table-header span:nth-child(8) {
        display: none;
    }
}

@media (max-width: 768px) {
    .gpc-po-table-header {
        display: none;
    }
    .gpc-po-row {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }
    .gpc-po-cell-source,
    .gpc-po-cell-date,
    .gpc-po-cell-project,
    .gpc-po-cell-created-by {
        display: none;
    }
    .gpc-po-filters {
        flex-direction: column;
        align-items: stretch;
    }
}

/* =========================================================================
   COST TRACKING TAB (Suivi des coûts)
   ========================================================================= */

.gpc-ct-wrapper {
    padding: 0;
}

.gpc-ct-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.gpc-ct-project-selector {
    min-width: 320px;
}

.gpc-ct-project-selector select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    background: #fff;
}

/* Cards grid */
.gpc-ct-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.gpc-text-success {
    color: #10b981;
}

.gpc-text-danger {
    color: #ef4444;
}

.gpc-ct-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.gpc-ct-card-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 10px;
}

.gpc-ct-card-label {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.gpc-ct-card-value {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
}

/* Charts grid */
.gpc-ct-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.gpc-ct-chart-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.gpc-ct-chart-box h4 {
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.gpc-ct-chart-box canvas {
    max-height: 300px;
}

.gpc-ct-chart-full {
    grid-column: 1 / -1;
}

.gpc-ct-chart-full canvas {
    max-height: 350px;
}

/* Table section */
.gpc-ct-table-section {
    margin-bottom: 28px;
}

.gpc-ct-table-section h4 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
}

.gpc-ct-table-section .gpc-text-muted {
    font-size: 12px;
    font-weight: 400;
}

/* Reuse existing .gpc-table styles */
.gpc-ct-table-section .gpc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.gpc-ct-table-section .gpc-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    border-bottom: 2px solid #e2e8f0;
    text-align: left;
}

.gpc-ct-table-section .gpc-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
}

.gpc-ct-table-section .gpc-table tr:hover td {
    background: #f8fafc;
}

/* Project info header */
.gpc-ct-project-info {
    margin: 16px 0 20px;
}

.gpc-ct-project-info h3 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

/* Responsive */
@media (max-width: 900px) {
    .gpc-ct-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .gpc-ct-charts {
        grid-template-columns: 1fr;
    }
    .gpc-ct-project-selector {
        min-width: 100%;
    }
}

@media (max-width: 600px) {
    .gpc-ct-cards {
        grid-template-columns: 1fr;
    }
    .gpc-ct-card-value {
        font-size: 18px;
    }
}

/* ============================================================
   Linked Projects (Projets jumelés)
   ============================================================ */
.gpc-linked-project-panel {
    transition: border-color 0.2s;
}
.gpc-linked-project-panel:hover {
    border-color: #cbd5e1 !important;
}
.gpc-linked-project-panel .gpc-tender-items-table {
    font-size: 13px;
}
.gpc-linked-project-panel .gpc-tender-items-table-scroll {
    max-height: 300px;
    overflow-y: auto;
}

/* ============================================================
   Budget Import Tab
   ============================================================ */
.gpc-budget-table-header {
    display: grid;
    grid-template-columns: 90px 90px 1fr 60px 120px 130px 140px 120px;
    gap: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    font-size: 0.8em;
    text-transform: uppercase;
    color: #64748b;
}
.gpc-budget-row {
    display: grid;
    grid-template-columns: 90px 90px 1fr 60px 120px 130px 140px 120px;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-top: none;
    font-size: 0.9em;
    align-items: center;
    transition: background 0.15s;
}
.gpc-budget-row:hover {
    background: #f1f5f9;
}
.gpc-budget-row:last-child {
    border-radius: 0 0 8px 8px;
}
.gpc-text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.gpc-budget-import-form {
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
