/* ═══════════════════════════════════════════════════════
   ACTES-CO (MOBILE SALES V2) - COCKPIT SPA DESIGN SYSTEM
   ═══════════════════════════════════════════════════════ */

/* Ensure zero unwanted parent margin/padding regardless of impersonation mode */
.main-content:has(.actes-co-viewport),
.main-content.impersonating:has(.actes-co-viewport) {
    margin: 45px 0 0 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

.actes-co-viewport {
    height: calc(100vh - 45px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg-body, #f8fafc);
    color: var(--text-main, #1e293b);
    box-sizing: border-box;
    padding: 10px 14px 10px 14px;
    gap: 10px;
}

/* ═══ 1. HEADER TOOLBAR (Harmonisé 100% avec MyStats) ═══ */
.ac-header-toolbar {
    height: 50px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    flex-shrink: 0;
}

/* ── Zone 1 : Collaborateur & Contexte ── */
.ac-header-advisor {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.ac-advisor-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 6px;
    border-radius: var(--radius-md);
    transition: background-color var(--trans-fast);
}

.ac-advisor-avatar {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background-color: var(--primary-light, rgba(22, 101, 192, 0.1));
    overflow: hidden;
}

.ac-advisor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.ac-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    background-color: var(--primary-light, rgba(22, 101, 192, 0.1));
    border-radius: 50%;
    text-transform: uppercase;
}

.ac-advisor-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ac-advisor-name {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.2;
}

.ac-advisor-sub {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 11px;
}

.ac-hub-tag {
    color: var(--text-muted);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ac-toolbar-center {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

/* Custom compact dropdowns */
.ac-select-compact {
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    flex-shrink: 0;
}

.ac-select-compact:focus {
    border-color: var(--primary);
}

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

/* Segmented control Production / Stats */
.ac-seg-control {
    display: inline-flex;
    background: var(--bg-body);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
    flex-shrink: 0;
}

.ac-seg-btn {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.ac-seg-btn:hover:not(.active) {
    color: var(--text-main);
}

.ac-seg-btn.active {
    background: var(--bg-card);
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* N-1 comparison pill */
.ac-trend-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(var(--primary-rgb, 59, 130, 246), 0.06);
    border: 1px solid rgba(var(--primary-rgb, 59, 130, 246), 0.18);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 0.74rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.ac-trend-pill.is-up {
    background: rgba(var(--success-rgb, 16, 185, 129), 0.1);
    border-color: rgba(var(--success-rgb, 16, 185, 129), 0.35);
}

.ac-trend-pill.is-down {
    background: rgba(var(--danger-rgb, 239, 68, 68), 0.1);
    border-color: rgba(var(--danger-rgb, 239, 68, 68), 0.35);
}

.ac-trend-pill.is-up .ac-trend-curr {
    color: var(--success, #10b981);
}

.ac-trend-pill.is-down .ac-trend-curr {
    color: var(--danger, #ef4444);
}

.ac-trend-curr {
    color: var(--text-main);
    font-weight: 700;
}

.ac-trend-prev-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ac-trend-arrow {
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 800;
}

.ac-trend-arrow.up {
    color: var(--success, #10b981);
}

.ac-trend-arrow.down {
    color: var(--danger, #ef4444);
}

.ac-trend-prev {
    color: var(--text-muted);
    font-weight: 500;
}

.ac-trend-none {
    color: var(--text-muted);
    font-size: 0.72rem;
    opacity: 0.8;
    font-weight: 500;
}

.ac-btn-import {
    background: var(--primary);
    color: var(--text-inverse, #ffffff);
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(var(--primary-rgb, 59, 130, 246), 0.25);
    white-space: nowrap;
}

.ac-btn-import:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* ═══ 2. MAIN COCKPIT BODY ═══ */
.ac-cockpit-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-areas: "form history history history side";
    gap: 10px;
    align-items: stretch;
}

.ac-form-card { grid-area: form; margin: 0; }
.ac-history-card { grid-area: history; margin: 0; }
.ac-right-stack { 
    grid-area: side; 
    margin: 0; 
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 0;
}

/* Cockpit cards */
.ac-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    min-width: 0;
    margin: 0;
}

.ac-card-header {
    height: 42px;
    min-height: 42px;
    max-height: 42px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
    box-sizing: border-box;
    gap: 8px;
    margin: 0;
}

.ac-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1;
    min-width: 0;
}

.ac-card-title i {
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.ac-card-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px;
}

/* Custom subtle scrollbar */
.ac-card-body::-webkit-scrollbar,
.ac-history-scroll::-webkit-scrollbar,
.ac-table-scroll::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.ac-card-body::-webkit-scrollbar-thumb,
.ac-history-scroll::-webkit-scrollbar-thumb,
.ac-table-scroll::-webkit-scrollbar-thumb {
    background: rgba(var(--text-muted-rgb, 148, 163, 184), 0.3);
    border-radius: 4px;
}

.ac-card-body::-webkit-scrollbar-thumb:hover,
.ac-history-scroll::-webkit-scrollbar-thumb:hover,
.ac-table-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ═══ 3. LEFT COLUMN: QUICK FORM ═══ */
.ac-form-group {
    margin-bottom: 10px;
}

.ac-form-group label {
    display: block;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.ac-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.ac-input-wrapper i {
    position: absolute;
    left: 10px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.ac-input {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 7px 10px;
    color: var(--text-main);
    font-size: 0.82rem;
    outline: none;
    transition: all 0.2s;
    box-sizing: border-box;
}

.ac-input.with-icon {
    padding-left: 30px;
}

.ac-input:focus {
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 59, 130, 246), 0.12);
}

/* Plan selector - 1 par ligne (vertical) avec couleurs discrètes */
.ac-plan-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ac-plan-btn {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
}

.ac-plan-btn:hover {
    transform: translateY(-1px);
}

.ac-plan-btn-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ac-plan-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ac-plan-dot.f5g { background: #3b82f6; }
.ac-plan-dot.sf { background: #10b981; }
.ac-plan-dot.mig { background: #ec4899; }
.ac-plan-dot.f5gmax { background: #f59e0b; }

.ac-plan-check {
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
}

/* Couleurs discrètes par type au repos et actif */
.ac-plan-btn.f5g {
    border-color: rgba(59, 130, 246, 0.22);
    background: rgba(59, 130, 246, 0.03);
}
.ac-plan-btn.f5g:hover {
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.08);
}
.ac-plan-btn.f5g.active {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.12);
    color: #2563eb;
    font-weight: 700;
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
}
[data-theme='dark'] .ac-plan-btn.f5g.active {
    color: #60a5fa;
}

.ac-plan-btn.sf {
    border-color: rgba(16, 185, 129, 0.22);
    background: rgba(16, 185, 129, 0.03);
}
.ac-plan-btn.sf:hover {
    border-color: rgba(16, 185, 129, 0.45);
    background: rgba(16, 185, 129, 0.08);
}
.ac-plan-btn.sf.active {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    font-weight: 700;
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25);
}
[data-theme='dark'] .ac-plan-btn.sf.active {
    color: #34d399;
}

.ac-plan-btn.mig {
    border-color: rgba(236, 72, 153, 0.22);
    background: rgba(236, 72, 153, 0.03);
}
.ac-plan-btn.mig:hover {
    border-color: rgba(236, 72, 153, 0.45);
    background: rgba(236, 72, 153, 0.08);
}
.ac-plan-btn.mig.active {
    border-color: #ec4899;
    background: rgba(236, 72, 153, 0.12);
    color: #db2777;
    font-weight: 700;
    box-shadow: 0 0 0 1px rgba(236, 72, 153, 0.25);
}
[data-theme='dark'] .ac-plan-btn.mig.active {
    color: #f472b6;
}

.ac-plan-btn.f5gmax {
    border-color: rgba(245, 158, 11, 0.25);
    background: rgba(245, 158, 11, 0.03);
}
.ac-plan-btn.f5gmax:hover {
    border-color: rgba(245, 158, 11, 0.48);
    background: rgba(245, 158, 11, 0.08);
}
.ac-plan-btn.f5gmax.active {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    font-weight: 700;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.25);
}
[data-theme='dark'] .ac-plan-btn.f5gmax.active {
    color: #fbbf24;
}

.ac-textarea {
    resize: none;
    height: 48px;
}

.ac-btn-submit {
    width: 100%;
    background: var(--primary);
    color: var(--text-inverse, #ffffff);
    border: none;
    border-radius: 8px;
    padding: 9px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb, 59, 130, 246), 0.3);
}

.ac-btn-submit:hover:not(:disabled) {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.ac-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ═══ 4. CENTER COLUMN: HISTORY TABLE ═══ */
.ac-history-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.ac-search-input {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    height: 26px;
    box-sizing: border-box;
    padding: 0 8px 0 24px;
    font-size: 0.74rem;
    color: var(--text-main);
    outline: none;
    width: 120px;
    transition: width 0.2s;
}

.ac-search-input:focus {
    width: 160px;
    border-color: var(--primary);
}

.ac-tool-btn {
    width: 26px;
    height: 26px;
    box-sizing: border-box;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    margin: 0;
}

.ac-tool-btn:hover {
    color: var(--primary);
    border-color: var(--primary-light);
}

/* Scroll hint bar (matching V1 design) */
.ac-scroll-hint {
    flex-shrink: 0;
    padding: 7px 14px;
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted);
    background: rgba(var(--primary-rgb, 59, 130, 246), 0.05);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s, color 0.2s;
}

.ac-scroll-hint:hover {
    background: rgba(var(--primary-rgb, 59, 130, 246), 0.1);
    color: var(--primary);
}

.ac-scroll-hint i {
    font-size: 0.95rem;
    color: var(--primary);
    animation: acBounce 2s infinite;
}

@keyframes acBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-1.5px);
    }
}

/* Double scrollable container: Y and X */
.ac-history-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ac-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    white-space: nowrap;
}

.ac-history-table {
    min-width: 600px; /* Guarantees columns and status badges are NEVER squished */
}

.ac-history-table .col-date { width: 75px; }
.ac-history-table .col-advisor { min-width: 130px; }
.ac-history-table .col-plan { width: 95px; }
.ac-history-table .col-id { width: 95px; }
.ac-history-table .col-gain { width: 65px; }
.ac-history-table .col-actions { min-width: 140px; }

.ac-history-table .advisor-name {
    font-weight: 600;
    color: var(--text-main);
    display: inline-block;
    max-width: 175px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.ac-table thead th {
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 2;
    padding: 7px 10px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.ac-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s;
}

.ac-table tbody tr:hover {
    background: rgba(var(--primary-rgb, 59, 130, 246), 0.03);
}

.ac-table td {
    padding: 7px 10px;
    vertical-align: middle;
}

/* Badges for plans */
.ac-badge-plan {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.ac-badge-plan.f5g { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.ac-badge-plan.sf { background: rgba(16, 185, 129, 0.12); color: #059669; }
.ac-badge-plan.mig { background: rgba(236, 72, 153, 0.12); color: #db2777; }
.ac-badge-plan.f5gmax { background: rgba(245, 158, 11, 0.14); color: #d97706; }

/* Masked id pill */
.ac-badge-id {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    font-family: monospace;
    font-size: 0.72rem;
    color: var(--text-muted);
    transition: all 0.15s;
    user-select: none;
}

.ac-badge-id.is-clickable {
    cursor: pointer;
}

.ac-badge-id.is-clickable:hover {
    color: var(--primary);
    border-color: var(--primary-light);
}

.ac-badge-id.is-locked {
    cursor: default;
    opacity: 0.85;
}

/* Variante révélable (fenêtre J+1 active) */
.ac-badge-id--reveal {
    cursor: pointer;
}
.ac-badge-id--reveal:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.06);
}

/* Variante RGPD verrouillée (J+1 23h59 expiré) */
.ac-badge-id--rgpd {
    position: relative;
    cursor: default;
    color: #92400e;
    background: rgba(245, 158, 11, 0.08);
    border-color: rgba(245, 158, 11, 0.3);
}

/* Tooltip RGPD au survol */
.ac-badge-id--rgpd .ac-rgpd-tooltip {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 240px;
    background: var(--bg-card);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
    text-align: left;
    font-family: inherit;
    font-size: 0.7rem;
    color: var(--text-main);
    z-index: 200;
    pointer-events: none;
    flex-direction: column;
    gap: 4px;
}

.ac-badge-id--rgpd:hover .ac-rgpd-tooltip {
    display: flex;
}

.ac-rgpd-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(245, 158, 11, 0.35);
}

.ac-rgpd-tooltip i {
    font-size: 1rem;
    color: #d97706;
    margin-bottom: 2px;
}

.ac-rgpd-tooltip strong {
    font-size: 0.72rem;
    color: var(--text-main);
    line-height: 1.3;
}

.ac-rgpd-tooltip span {
    font-size: 0.67rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 2px;
}

/* Gain pill */
.ac-gain-text {
    font-weight: 700;
    color: var(--success);
}

/* Row action buttons */
.ac-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ac-btn-action {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    font-size: 0.78rem;
    transition: transform 0.15s, filter 0.15s;
    flex-shrink: 0;
}

.ac-btn-action:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.ac-btn-action.copy { background: var(--primary); }
.ac-btn-action.approve { background: var(--success); }
.ac-btn-action.retract { background: var(--danger); }
.ac-btn-action.comment {
    background: rgba(var(--primary-rgb, 59, 130, 246), 0.12);
    color: var(--primary);
    border: 1px solid rgba(var(--primary-rgb, 59, 130, 246), 0.25);
}

/* Bouton RGPD verrouillé (remplace le bouton copier) */
.ac-btn-action--rgpd-lock {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    flex-shrink: 0;
    cursor: default;
    color: #92400e;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    opacity: 0.75;
}


/* Status Badges */
.ac-status-badge {
    padding: 2px 7px;
    font-size: 0.65rem;
    border-radius: 5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    line-height: 1.2;
    flex-shrink: 0;
}

.ac-status-badge.validated {
    background: rgba(var(--success-rgb, 16, 185, 129), 0.15);
    color: var(--success, #10b981);
    border: 1px solid rgba(var(--success-rgb, 16, 185, 129), 0.3);
}

.ac-status-badge.pending {
    background: rgba(var(--warning-rgb, 245, 158, 11), 0.15);
    color: var(--warning, #f59e0b);
    border: 1px solid rgba(var(--warning-rgb, 245, 158, 11), 0.3);
}

.ac-status-badge.retracted {
    background: rgba(var(--danger-rgb, 239, 68, 68), 0.15);
    color: var(--danger, #ef4444);
    border: 1px solid rgba(var(--danger-rgb, 239, 68, 68), 0.3);
}

/* ═══ 5. RIGHT COLUMN: TEAM & PENDING / PRIMES ═══ */
.ac-right-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 0;
}

.ac-team-card {
    flex: 1.1;
    min-height: 0;
}

.ac-bottom-right-card {
    flex: 0.9;
    min-height: 0;
}

.ac-table-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ac-team-card .ac-table {
    min-width: 240px;
}

.ac-mini-num {
    display: inline-block;
    min-width: 18px;
    text-align: center;
    font-weight: 700;
    border-radius: 4px;
    padding: 1px 4px;
    font-size: 0.7rem;
}

.ac-mini-num.f5g { background: rgba(59, 130, 246, 0.1); color: #2563eb; }
.ac-mini-num.sf { background: rgba(16, 185, 129, 0.1); color: #059669; }
.ac-mini-num.mig { background: rgba(236, 72, 153, 0.1); color: #db2777; }
.ac-mini-num.f5gmax { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.ac-mini-num.total { background: var(--bg-secondary); color: var(--text-main); }

.ac-my-team-row {
    background: rgba(var(--primary-rgb, 59, 130, 246), 0.08);
}

.ac-me-tag {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
    background: var(--primary);
    color: var(--text-inverse, #ffffff);
    margin-left: 5px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    display: inline-block;
    vertical-align: middle;
}

/* Pending Empty State */
.ac-empty-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 14px;
    text-align: center;
    color: var(--text-muted);
}

.ac-empty-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(var(--success-rgb, 16, 185, 129), 0.1);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 6px;
}

/* Prime Estimator */
.ac-prime-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
}

.ac-year-summary-box {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-around;
}

.ac-year-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.ac-year-stat-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 600;
}

.ac-year-stat-val {
    font-size: 0.88rem;
    color: var(--text-main);
    font-weight: 800;
}

.ac-year-stat-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
}

.ac-prime-progress {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 7px 10px;
    border: 1px solid var(--border-color);
}

.ac-bar-track {
    height: 5px;
    background: rgba(0,0,0,0.06);
    border-radius: 3px;
    overflow: hidden;
    margin: 5px 0;
}

.ac-bar-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.ac-prime-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(var(--primary-rgb, 59, 130, 246), 0.08);
    border: 1px dashed rgba(var(--primary-rgb, 59, 130, 246), 0.3);
    border-radius: 8px;
    padding: 7px 10px;
}

/* ═══ 6. FOOTER KPI BAR ═══ */
.ac-kpi-footer {
    height: 74px;
    min-height: 74px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.ac-kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    min-width: 0;
}

.ac-kpi-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.ac-kpi-icon.f5g { background: rgba(59, 130, 246, 0.12); color: #2563eb; }
.ac-kpi-icon.sf { background: rgba(16, 185, 129, 0.12); color: #059669; }
.ac-kpi-icon.f5gmax { background: rgba(245, 158, 11, 0.14); color: #d97706; }
.ac-kpi-icon.mig { background: rgba(236, 72, 153, 0.12); color: #db2777; }
.ac-kpi-icon.total { background: rgba(99, 102, 241, 0.12); color: #6366f1; }

.ac-kpi-data {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
    gap: 3px;
}

.ac-kpi-header-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
}

.ac-kpi-number {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-main);
    flex-shrink: 0;
}

.ac-kpi-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ac-kpi-trend {
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ac-kpi-trend.up { color: var(--success); }
.ac-kpi-trend.down { color: var(--danger); }
.ac-kpi-trend.neutral { color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════
   5. STATISTICS VIEW & ANALYTICS COCKPIT
   ═══════════════════════════════════════════════════════ */
.ac-stats-layout {
    display: flex;
    gap: 12px;
    height: 100%;
    min-height: 0;
    width: 100%;
    box-sizing: border-box;
}

/* Sidebar Advisors Filter */
.ac-stats-sidebar {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

.ac-stats-filter-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.ac-stats-sidebar-header {
    padding: 0 14px;
    border-bottom: 1px solid var(--border-color);
    height: 42px;
    min-height: 42px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.ac-stats-sidebar-actions {
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-hover);
}

.ac-btn-pill-small {
    flex: 1;
    padding: 4px 6px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.ac-btn-pill-small:hover {
    background: var(--bg-card);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(var(--primary-rgb, 59, 130, 246), 0.15);
}

.ac-advisor-filter-list {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ac-advisor-checkbox {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    width: 100%;
    box-sizing: border-box;
}

.ac-advisor-checkbox:hover {
    background: var(--bg-hover);
    transform: translateX(2px);
}

.ac-advisor-name-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.ac-advisor-color-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ac-advisor-filter-name {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ac-advisor-check-icon {
    font-size: 1rem;
    color: var(--text-muted);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.ac-advisor-check-icon .ri-checkbox-fill {
    color: var(--warning, #f59e0b);
}

.ac-stats-empty-sub {
    padding: 24px 12px;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Main Statistics Canvas Area */
.ac-stats-main {
    flex: 1;
    min-width: 0;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 4px;
    position: relative;
}

.ac-stats-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-height: 0;
    transition: opacity 0.22s ease, filter 0.22s ease;
}

.ac-stats-content.is-transitioning {
    opacity: 0.65;
    filter: blur(0.3px);
    pointer-events: none;
}

/* Subtle top indeterminate progress bar */
.ac-stats-progress-bar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    width: 100%;
    background: transparent;
    z-index: 10;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 2px;
    margin-bottom: -7px;
}

.ac-stats-progress-bar.active {
    opacity: 1;
    background: rgba(var(--primary-rgb, 59, 130, 246), 0.15);
}

.ac-stats-progress-bar.active::after {
    content: '';
    display: block;
    width: 40%;
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    animation: ac-progress-indeterminate 0.9s infinite ease-in-out;
}

@keyframes ac-progress-indeterminate {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

.ac-stats-kpi-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.ac-stats-kpi-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    transition: border-color 0.2s ease, background 0.2s ease;
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ac-stats-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    background: rgba(245, 158, 11, 0.12);
    color: var(--warning, #f59e0b);
    flex-shrink: 0;
}

.ac-stats-kpi-icon.challenge {
    background: rgba(99, 102, 241, 0.12);
    color: #6366f1;
}

.ac-stats-kpi-icon.quality {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success, #10b981);
}

.ac-stats-kpi-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.ac-stats-kpi-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.ac-stats-kpi-label {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Charts Grid */
.ac-stats-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    flex: 1;
    min-height: 0;
}

.ac-chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.ac-chart-card.ac-chart-wide {
    grid-column: 1 / -1;
}

.ac-chart-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.ac-chart-header-flex h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
}

.ac-chart-header-flex h4 i {
    color: var(--primary);
}

.ac-btn-trendline {
    padding: 3px 9px;
    font-size: 0.72rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.ac-btn-trendline:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

.ac-btn-trendline.active {
    background: rgba(220, 38, 38, 0.12);
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.35);
}

.ac-chart-container {
    position: relative;
    flex: 1;
    min-height: 240px;
    height: 250px;
    width: 100%;
}

.ac-chart-wide .ac-chart-container {
    min-height: 270px;
    height: 270px;
}

/* Loading & Empty States */
.ac-stats-loading,
.ac-stats-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    color: var(--text-muted);
    text-align: center;
}

.ac-stats-loading i,
.ac-stats-empty i {
    font-size: 2.2rem;
    opacity: 0.5;
}

.ac-stats-loading .spin {
    animation: ac-spin 1s linear infinite;
}

@keyframes ac-spin {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS (DESKTOP -> LAPTOP -> TABLET)
   ═══════════════════════════════════════════════════════ */

/* 1. Large Laptop (1101px to 1380px) */
@media (min-width: 1101px) and (max-width: 1380px) {
    .ac-cockpit-grid {
        grid-template-columns: repeat(5, 1fr);
        grid-template-areas: "form history history history side";
        gap: 8px;
    }
    .ac-trend-prev-wrap {
        display: none !important;
    }
    .ac-kpi-footer {
        height: 70px;
        min-height: 70px;
        gap: 8px;
    }
    .ac-kpi-card {
        padding: 0 10px;
        gap: 8px;
    }
    .ac-kpi-icon {
        width: 34px;
        height: 34px;
        font-size: 1.05rem;
    }
    .ac-kpi-number {
        font-size: 1.15rem;
    }
}

/* 2. Compact Laptop / Split Screen (901px to 1100px) */
@media (min-width: 901px) and (max-width: 1100px) {
    .actes-co-viewport {
        height: calc(100vh - 45px);
        overflow: hidden;
        padding: 8px 10px;
        gap: 8px;
    }
    .ac-trend-pill { display: none !important; }
    .ac-quick-btn .ac-btn-text { display: none; }
    .ac-quick-btn { padding: 4px 6px; }

    /* 2 Columns: Form + Side in Col 1, History takes all of Col 2 */
    .ac-cockpit-grid {
        grid-template-columns: 280px minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        grid-template-areas:
            "form history"
            "side history";
        gap: 8px;
    }
    .ac-form-card {
        max-height: 330px;
    }
    .ac-stats-sidebar {
        width: 210px;
    }
    .ac-stats-kpi-row {
        gap: 8px;
    }
    .ac-stats-kpi-card {
        padding: 10px 12px;
        gap: 8px;
    }
    .ac-stats-kpi-icon {
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
    }
    .ac-stats-kpi-value {
        font-size: 1.15rem;
    }
    .ac-stats-kpi-label {
        font-size: 0.68rem;
    }
    .ac-stats-charts-grid {
        grid-template-columns: 1fr;
    }
    .ac-kpi-footer {
        height: 68px;
        min-height: 68px;
        gap: 6px;
    }
    .ac-kpi-card {
        padding: 0 8px;
        gap: 6px;
    }
    .ac-kpi-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    .ac-kpi-number {
        font-size: 1.1rem;
    }
}

/* 3. Small Screen / Tablet (< 900px) */
@media (max-width: 900px) {
    .actes-co-viewport {
        height: auto;
        min-height: calc(100vh - 45px);
        overflow-y: auto;
        padding: 8px 10px;
    }
    .ac-header-toolbar {
        height: auto;
        min-height: 48px;
        flex-wrap: wrap;
        padding: 8px 12px;
        gap: 8px;
    }
    .ac-trend-pill { display: none !important; }
    .ac-toolbar-center {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
    }
    .ac-toolbar-right {
        order: 2;
    }
    .ac-cockpit-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }
    .ac-stats-layout {
        flex-direction: column;
        height: auto;
    }
    .ac-stats-sidebar {
        width: 100%;
        height: auto;
        max-height: 240px;
    }
    .ac-stats-kpi-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .ac-stats-charts-grid {
        grid-template-columns: 1fr;
    }
    .ac-card {
        min-height: 350px;
    }
    .ac-kpi-footer {
        grid-template-columns: repeat(2, 1fr);
        height: auto;
        min-height: 0;
        gap: 8px;
    }
    .ac-kpi-card {
        padding: 10px 12px;
    }
}

/* ═══════════════════════════════════════════════════════
   6. MASS CSV IMPORT MODAL & FORMAT GUIDE
   ═══════════════════════════════════════════════════════ */

/* Info Pill Button in Modal Header */
.ac-btn-info-pill {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.74rem;
    font-weight: 600;
    background: rgba(var(--primary-rgb, 59, 130, 246), 0.1);
    border: 1px solid rgba(var(--primary-rgb, 59, 130, 246), 0.25);
    color: var(--primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.ac-btn-info-pill:hover,
.ac-btn-info-pill.active {
    background: var(--primary);
    color: var(--text-inverse, #ffffff);
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(var(--primary-rgb, 59, 130, 246), 0.3);
}

.ac-modal-close-btn {
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.ac-modal-close-btn:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

/* CSV Guide Collapsible Panel */
.ac-csv-guide-panel {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    animation: ac-fade-in 0.2s ease;
}

@keyframes ac-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.ac-guide-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.ac-guide-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-main);
    font-weight: 700;
}

.ac-guide-title i {
    color: var(--primary);
}

.ac-btn-micro-guide {
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.ac-btn-micro-guide:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.ac-btn-micro-guide.primary {
    background: rgba(var(--primary-rgb, 59, 130, 246), 0.12);
    color: var(--primary);
    border-color: rgba(var(--primary-rgb, 59, 130, 246), 0.3);
}

.ac-btn-micro-guide.primary:hover {
    background: var(--primary);
    color: var(--text-inverse, #ffffff);
}

.ac-guide-desc {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.45;
}

.ac-guide-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.ac-guide-col-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ac-guide-col-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-main);
}

.ac-guide-col-idx {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 5px;
    background: rgba(var(--primary-rgb, 59, 130, 246), 0.12);
    color: var(--primary);
    border-radius: 4px;
}

.ac-guide-col-desc {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.ac-guide-col-format code {
    font-size: 0.68rem;
    padding: 1px 4px;
    background: var(--bg-hover);
    border-radius: 4px;
    color: var(--text-main);
}

.ac-guide-col-ex {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.ac-guide-col-ex code {
    color: var(--primary);
    background: transparent;
}

.ac-guide-example-preview {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ac-guide-ex-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-main);
}

.ac-guide-code {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 10px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--text-main);
    margin: 0;
    line-height: 1.4;
    white-space: pre-wrap;
    user-select: all;
}

.ac-guide-footer-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 10px;
}

.ac-guide-footer-tip kbd {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.7rem;
    font-family: inherit;
    color: var(--text-main);
}

/* Steps Indicator */
.ac-import-step-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.ac-import-step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.ac-import-step-item.active {
    color: var(--primary);
}

.ac-step-circle {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ac-import-step-item.active .ac-step-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-inverse, #ffffff);
}

.ac-import-step-sep {
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* File Dropzone */
.ac-file-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    background: var(--bg-hover);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ac-file-dropzone:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb, 59, 130, 246), 0.05);
}

.ac-dropzone-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

/* Mapping box & items */
.ac-mapping-box {
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px;
}

.ac-mapping-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 10px;
}

.ac-mapping-tag {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-main);
    min-width: 90px;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Alert / Warning Box */
.ac-alert-box {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.76rem;
    border: 1px solid transparent;
}

.ac-alert-box.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
    color: var(--warning, #f59e0b);
}

/* Stat Box for Results */
.ac-stat-box {
    padding: 16px 24px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 140px;
    border: 1px solid transparent;
}

.ac-stat-box.success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
}

.ac-stat-box.success .ac-stat-num {
    color: var(--success, #10b981);
}

.ac-stat-box.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.ac-stat-box.warning .ac-stat-num {
    color: var(--warning, #f59e0b);
}

.ac-stat-num {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.ac-stat-lbl {
    font-size: 0.74rem;
    color: var(--text-muted);
}

@media (max-width: 600px) {
    .ac-guide-grid {
        grid-template-columns: 1fr 1fr;
    }
}
