/* ============================================================
   ACFA Dashboard v2 — Dark Premium Design
   Super Web Development LLP / WDG
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── Root variables ── */
:root {
    --bg-base:      #0a0f1e;
    --bg-card:      #0f172a;
    --bg-card2:     #131c2e;
    --bg-surface:   #1e293b;
    --bg-hover:     #243044;
    --border:       rgba(255,255,255,0.07);
    --border-light: rgba(255,255,255,0.12);

    --text-primary:   #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted:     #475569;

    --green:  #22c55e;
    --blue:   #3b82f6;
    --red:    #f43f5e;
    --yellow: #f59e0b;
    --purple: #a855f7;

    --green-dim:  rgba(34,197,94,0.12);
    --blue-dim:   rgba(59,130,246,0.12);
    --red-dim:    rgba(244,63,94,0.12);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    --shadow-card: 0 1px 3px rgba(0,0,0,0.4), 0 4px 16px rgba(0,0,0,0.3);
    --shadow-glow: 0 0 20px rgba(59,130,246,0.15);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ── Reset ── */
.acfa2-wrap * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Wrapper ── */
.acfa2-wrap {
    font-family: var(--font);
    background: var(--bg-base);
    min-height: 100vh;
    color: var(--text-primary);
    padding: 0;
    position: relative;
}

.acfa2-wrap::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at 20% 10%, rgba(59,130,246,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 90%, rgba(168,85,247,0.06) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ── Header ── */
.acfa2-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 28px;
    height: 58px;
    background: rgba(10,15,30,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.acfa2-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.acfa2-logo {
    height: 28px;
    width: auto;
    filter: brightness(1.05);
}

.acfa2-header-divider {
    width: 1px;
    height: 24px;
    background: var(--border-light);
}

.acfa2-app-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.acfa2-app-sub {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
}

.acfa2-header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.acfa2-header-live-pulse {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(34,197,94,0.1);
    border: 1px solid rgba(34,197,94,0.25);
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--green);
    font-weight: 500;
}

.acfa2-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.acfa2-greeting-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg-surface);
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.acfa2-greeting-chip strong {
    color: var(--text-primary);
}

.acfa2-greeting-icon {
    font-size: 14px;
}

.acfa2-btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(244,63,94,0.12);
    color: var(--red) !important;
    border: 1px solid rgba(244,63,94,0.25);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s;
}

.acfa2-btn-logout:hover {
    background: rgba(244,63,94,0.22);
    border-color: rgba(244,63,94,0.5);
}

/* ── Pulse dot ── */
.acfa2-pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green);
    flex-shrink: 0;
    animation: acfa2pulse 2s ease-in-out infinite;
}

@keyframes acfa2pulse {
    0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(34,197,94,0.5); }
    50% { opacity: 0.8; transform: scale(1.1); box-shadow: 0 0 0 5px rgba(34,197,94,0); }
}

.acfa2-pulse-label {
    font-size: 12px;
    font-weight: 500;
}

/* ── Hero stats ── */
.acfa2-hero-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    background: var(--border);
    position: relative;
    z-index: 1;
}

@media (max-width: 900px) {
    .acfa2-hero-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .acfa2-hero-stats { grid-template-columns: repeat(2, 1fr); }
}

.acfa2-stat-card {
    background: var(--bg-card);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
    transition: background 0.2s;
}

.acfa2-stat-card::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    height: 2px;
    width: 100%;
    background: var(--accent, transparent);
    opacity: 0.7;
}

.acfa2-stat-card:hover {
    background: var(--bg-card2);
}

.acfa2-stat-total   { --accent: var(--text-muted); }
.acfa2-stat-processed { --accent: var(--blue); }
.acfa2-stat-auto    { --accent: var(--green); }
.acfa2-stat-manual  { --accent: var(--yellow); }
.acfa2-stat-failed  { --accent: var(--red); }

.acfa2-stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg-surface);
}

.acfa2-stat-total   .acfa2-stat-icon { color: var(--text-secondary); }
.acfa2-stat-processed .acfa2-stat-icon { color: var(--blue); background: var(--blue-dim); }
.acfa2-stat-auto    .acfa2-stat-icon { color: var(--green); background: var(--green-dim); }
.acfa2-stat-manual  .acfa2-stat-icon { color: var(--yellow); background: rgba(245,158,11,0.12); }
.acfa2-stat-failed  .acfa2-stat-icon { color: var(--red); background: var(--red-dim); }

.acfa2-stat-body {
    flex: 1;
    min-width: 0;
}

.acfa2-stat-num {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
}

.acfa2-stat-lbl {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 3px;
}

.acfa2-stat-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.acfa2-mini-bar {
    height: 3px;
    background: var(--bg-surface);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 6px;
}

.acfa2-mini-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: var(--fill, 0%);
    background: var(--accent, var(--blue));
    border-radius: 2px;
    transition: width 1s ease;
}

/* ── Main Grid ── */
.acfa2-main-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 20px;
    padding: 24px 28px;
    position: relative;
    z-index: 1;
    align-items: start;
}

@media (max-width: 1024px) {
    .acfa2-main-grid { grid-template-columns: 1fr; }
}

/* ── Cards ── */
.acfa2-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-card);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.acfa2-card:hover {
    border-color: var(--border-light);
}

.acfa2-card:last-child {
    margin-bottom: 0;
}

.acfa2-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 10px;
}

.acfa2-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.acfa2-card-title svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ── Badges ── */
.acfa2-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 9px;
    border-radius: 20px;
    flex-shrink: 0;
}

.acfa2-badge-green  { background: var(--green-dim); color: var(--green); border: 1px solid rgba(34,197,94,0.2); }
.acfa2-badge-blue   { background: var(--blue-dim);  color: var(--blue);  border: 1px solid rgba(59,130,246,0.2); }
.acfa2-badge-gray   { background: var(--bg-surface); color: var(--text-muted); border: 1px solid var(--border); }
.acfa2-badge-red    { background: var(--red-dim); color: var(--red); border: 1px solid rgba(244,63,94,0.2); }

/* ── Performance card ── */
.acfa2-perf-card {
    background: linear-gradient(135deg, #0f172a 0%, #131c2e 100%);
    border-color: rgba(59,130,246,0.15);
}

.acfa2-perf-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 22px;
}

.acfa2-perf-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 10px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.acfa2-radial-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}

.acfa2-radial-wrap canvas {
    width: 72px !important;
    height: 72px !important;
}

.acfa2-radial-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.acfa2-perf-name {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Donut breakdown */
.acfa2-donut-section {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.acfa2-donut-wrap {
    position: relative;
    width: 130px;
    height: 130px;
    flex-shrink: 0;
}

.acfa2-donut-wrap canvas {
    width: 130px !important;
    height: 130px !important;
}

.acfa2-donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.acfa2-donut-center strong {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: -0.5px;
}

.acfa2-donut-center span {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.acfa2-donut-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.acfa2-legend-row {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12px;
}

.acfa2-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

.acfa2-legend-name {
    flex: 1;
    color: var(--text-secondary);
}

.acfa2-legend-val {
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* ── Active job card ── */
.acfa2-active-card {
    border-color: rgba(34,197,94,0.25);
    background: linear-gradient(135deg, #0a1a10 0%, #0f2018 100%);
}

.acfa2-active-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.acfa2-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.acfa2-progress-track {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    overflow: visible;
    position: relative;
}

.acfa2-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #16a34a, #22c55e);
    border-radius: 4px;
    transition: width 0.6s ease;
    position: relative;
}

.acfa2-progress-fill::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34,197,94,0.8);
}

.acfa2-progress-pct {
    font-size: 13px;
    font-weight: 700;
    color: var(--green);
    min-width: 40px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.acfa2-active-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 4px;
}

.acfa2-run-instructions {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 11px 14px;
    background: rgba(34,197,94,0.07);
    border: 1px solid rgba(34,197,94,0.15);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.acfa2-run-instructions svg {
    color: var(--green);
    flex-shrink: 0;
    margin-top: 1px;
}

.acfa2-run-instructions strong {
    color: var(--green);
}

/* ── API Keys ── */
.acfa2-keys-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.acfa2-key-row {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    transition: border-color 0.2s;
}

.acfa2-key-row:hover {
    border-color: var(--border-light);
}

.acfa2-key-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.acfa2-key-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.acfa2-key-display {
    display: flex;
    gap: 8px;
    align-items: center;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin-bottom: 8px;
}

.acfa2-key-val {
    flex: 1;
    font-family: var(--mono);
    font-size: 11px;
    color: var(--text-secondary);
    word-break: break-all;
    user-select: all;
    background: transparent;
    border: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 240px;
}

.acfa2-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--blue-dim);
    color: var(--blue);
    border: 1px solid rgba(59,130,246,0.2);
    padding: 5px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.acfa2-copy-btn:hover {
    background: rgba(59,130,246,0.25);
    border-color: rgba(59,130,246,0.4);
}

.acfa2-key-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    flex-wrap: wrap;
    gap: 4px;
}

/* Admin section */
.acfa2-admin-keys-section {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.acfa2-section-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.acfa2-all-users-grid {
    display: grid;
    gap: 12px;
}

.acfa2-user-api-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
}

.acfa2-user-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.acfa2-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.acfa2-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.acfa2-user-email {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Shimmer loading */
.acfa2-loading-shimmer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 0;
}

.acfa2-shimmer-row {
    height: 16px;
    background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-hover) 50%, var(--bg-surface) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: acfa2shimmer 1.5s infinite;
}

@keyframes acfa2shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Chart wrap ── */
.acfa2-chart-wrap {
    height: 220px;
    position: relative;
}

/* ── Create job card ── */
.acfa2-create-job-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(59,130,246,0.04) 100%);
    border-color: rgba(59,130,246,0.15);
}

/* ── Textarea ── */
#acfa-fe-urls {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-base);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--mono);
    font-size: 12px;
    color: var(--text-primary);
    resize: vertical;
    line-height: 1.7;
    transition: border-color 0.2s;
}

#acfa-fe-urls::placeholder {
    color: var(--text-muted);
}

#acfa-fe-urls:focus {
    outline: none;
    border-color: rgba(59,130,246,0.4);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.08);
}

.acfa2-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}

/* ── Buttons ── */
.acfa2-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font);
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.acfa2-btn:active { transform: scale(0.97); }

.acfa2-btn-primary {
    background: var(--blue);
    color: white;
    box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}

.acfa2-btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(59,130,246,0.4);
    transform: translateY(-1px);
}

#acfa-fe-import-msg {
    font-size: 12px;
    font-weight: 600;
}
#acfa-fe-import-msg.success { color: var(--green); }
#acfa-fe-import-msg.error   { color: var(--red); }

/* ── Table ── */
.acfa2-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.acfa2-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.acfa2-table th {
    padding: 10px 14px;
    background: var(--bg-surface);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}

.acfa2-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    vertical-align: middle;
}

.acfa2-table tr:last-child td { border-bottom: none; }

.acfa2-table tr:hover td {
    background: rgba(255,255,255,0.02);
}

.acfa2-job-link {
    color: var(--blue) !important;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 12px;
}

.acfa2-job-link:hover {
    color: #60a5fa !important;
}

/* Status buttons in table */
.acfa2-status-btn {
    padding: 4px 10px;
    border: none;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
}

.acfa2-status-active {
    background: var(--green-dim);
    color: var(--green);
    border: 1px solid rgba(34,197,94,0.2);
}

.acfa2-status-done {
    background: var(--bg-surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* Cell inline progress */
.acfa2-cell-progress {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.acfa2-inline-bar {
    height: 3px;
    background: var(--bg-surface);
    border-radius: 2px;
    overflow: hidden;
    width: 60px;
}

.acfa2-inline-bar > div {
    height: 100%;
    background: var(--blue);
    border-radius: 2px;
}

.acfa2-td-green { color: var(--green) !important; font-weight: 600; }
.acfa2-td-blue  { color: var(--blue)  !important; font-weight: 600; }
.acfa2-td-red   { color: var(--red)   !important; font-weight: 600; }
.acfa2-td-muted { color: var(--text-muted) !important; }

/* ── Extensions ── */
.acfa2-ext-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.acfa2-ext-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: var(--bg-surface);
    color: var(--text-secondary) !important;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.2s;
}

.acfa2-ext-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-light);
    color: var(--text-primary) !important;
}

.acfa2-ext-btn-featured {
    background: var(--blue-dim);
    color: var(--blue) !important;
    border-color: rgba(59,130,246,0.2);
}

.acfa2-ext-btn-featured:hover {
    background: rgba(59,130,246,0.2);
    color: #60a5fa !important;
}

/* ── Empty state ── */
.acfa2-empty-state {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    font-size: 13px;
}

.acfa2-empty-icon {
    font-size: 36px;
    margin-bottom: 10px;
    opacity: 0.5;
}

/* ── Muted text ── */
.acfa2-muted {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ── Modal ── */
.acfa2-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
}

.acfa2-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
}

.acfa2-modal-content {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 1100px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    animation: acfa2modalIn 0.2s ease;
}

@keyframes acfa2modalIn {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.acfa2-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card2);
}

.acfa2-modal-head h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.acfa2-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.acfa2-modal-close:hover {
    background: var(--bg-surface);
    color: var(--text-primary);
}

#acfa-fe-modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(85vh - 70px);
}

.acfa2-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

.acfa2-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--bg-surface);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: acfa2spin 0.7s linear infinite;
}

@keyframes acfa2spin {
    to { transform: rotate(360deg); }
}

/* ── Toast ── */
#acfa2-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999999;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

#acfa2-toast.acfa2-toast-show {
    opacity: 1;
    transform: translateY(0);
}

#acfa2-toast.acfa2-toast-success {
    background: #14532d;
    color: var(--green);
    border: 1px solid rgba(34,197,94,0.3);
}

#acfa2-toast.acfa2-toast-error {
    background: #4c0519;
    color: var(--red);
    border: 1px solid rgba(244,63,94,0.3);
}

/* ── Modal job details table ── */
.acfa-fe-job-summary {
    background: var(--bg-surface);
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.acfa-fe-summary-row {
    font-size: 13px;
    color: var(--text-secondary);
}

.acfa-fe-summary-row strong {
    color: var(--text-muted);
    margin-right: 6px;
}

.acfa-fe-urls-table-wrapper {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.acfa-fe-urls-modal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.acfa-fe-urls-modal-table thead th {
    background: var(--bg-surface);
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.acfa-fe-urls-modal-table tbody td {
    padding: 10px 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.acfa-fe-urls-modal-table tr:last-child td { border-bottom: none; }
.acfa-fe-urls-modal-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Login page (keep working) ── */
.acfa-fullscreen-login {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100vh;
    z-index: 999999; overflow: hidden;
}
.acfa-login-background {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #0a0f1e 0%, #111827 100%);
}
.acfa-login-background::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(59,130,246,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(168,85,247,0.12) 0%, transparent 50%);
    animation: acfaBackgroundPulse 15s ease-in-out infinite;
}
@keyframes acfaBackgroundPulse {
    0%, 100% { opacity: 1; } 50% { opacity: 0.6; }
}
.acfa-wave-container {
    position: absolute; inset: 0; overflow: hidden; opacity: 0.08;
}
.acfa-wave {
    position: absolute; width: 200%; height: 200%;
    border-radius: 45%;
    background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.3));
    animation: acfaWave 20s linear infinite;
}
.acfa-wave:nth-child(1) { top: -120%; left: -50%; animation-duration: 25s; }
.acfa-wave:nth-child(2) { top: -140%; left: -60%; animation-duration: 30s; animation-delay: -5s; }
.acfa-wave:nth-child(3) { top: -100%; left: -40%; animation-duration: 35s; animation-delay: -10s; }
@keyframes acfaWave { to { transform: rotate(360deg); } }
.acfa-login-container {
    position: relative; z-index: 10;
    height: 100vh; display: flex;
    align-items: center; justify-content: center; padding: 20px;
}
.acfa-login-card {
    background: var(--bg-card, #0f172a);
    border: 1px solid var(--border, rgba(255,255,255,0.07));
    border-radius: 16px; padding: 56px 48px;
    width: 100%; max-width: 460px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: acfaCardSlideIn 0.5s cubic-bezier(0.22,1,0.36,1);
}
@keyframes acfaCardSlideIn {
    from { opacity: 0; transform: translateY(24px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.acfa-logo-container { text-align: center; margin-bottom: 36px; }
.acfa-logo-container img { max-width: 200px; }
.acfa-sign-in-heading {
    font-size: 28px; font-weight: 700;
    color: var(--text-primary, #f1f5f9);
    margin: 0 0 28px; letter-spacing: -0.5px;
}
.acfa-form-group { margin-bottom: 16px; }
.acfa-form-input {
    width: 100%; padding: 12px 16px;
    font-size: 14px; border: 1px solid var(--border, rgba(255,255,255,0.07));
    border-radius: 6px; background: var(--bg-surface, #1e293b);
    color: var(--text-primary, #f1f5f9); box-sizing: border-box;
    font-family: var(--font, 'Inter', sans-serif);
    transition: all 0.2s;
}
.acfa-form-input::placeholder { color: var(--text-muted, #475569); }
.acfa-form-input:focus { outline: none; border-color: var(--blue, #3b82f6); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }
.acfa-remember-group { margin-bottom: 20px; font-size: 13px; }
.acfa-remember-group label { display: flex; align-items: center; gap: 8px; color: var(--text-secondary, #94a3b8); cursor: pointer; }
.acfa-submit-btn {
    width: 100%; padding: 13px 24px;
    background: var(--blue, #3b82f6); color: white;
    border: none; border-radius: 6px;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all 0.2s; margin-bottom: 24px;
    font-family: var(--font, 'Inter', sans-serif);
}
.acfa-submit-btn:hover { background: #2563eb; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(59,130,246,0.35); }
.acfa-disclaimer { font-size: 11px; line-height: 1.6; color: var(--text-muted, #475569); padding: 14px; background: var(--bg-surface, #1e293b); border-radius: 6px; }
.acfa-login-error { background: var(--red-dim, rgba(244,63,94,0.12)); color: var(--red, #f43f5e); padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 13px; border: 1px solid rgba(244,63,94,0.25); }
.acfa-login-success { background: var(--green-dim, rgba(34,197,94,0.12)); color: var(--green, #22c55e); padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 13px; border: 1px solid rgba(34,197,94,0.25); }

/* ── Name fields card (kept for compat) ── */
.acfa-fe-name-fields { display: none; }

/* ── WordPress admin bar offset ── */
.admin-bar .acfa2-header { top: 32px; }

/* ── Scrollbar ── */
.acfa2-wrap ::-webkit-scrollbar { width: 6px; height: 6px; }
.acfa2-wrap ::-webkit-scrollbar-track { background: var(--bg-base); }
.acfa2-wrap ::-webkit-scrollbar-thumb { background: var(--bg-surface); border-radius: 3px; }
.acfa2-wrap ::-webkit-scrollbar-thumb:hover { background: var(--bg-hover); }

/* ── Responsive ── */
@media (max-width: 768px) {
    .acfa2-header { height: auto; padding: 12px 16px; }
    .acfa2-main-grid { padding: 16px; gap: 14px; }
    .acfa2-card { padding: 16px; }
    .acfa2-perf-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .acfa2-donut-section { flex-direction: column; align-items: flex-start; }
    .acfa2-greeting-chip { display: none; }
}
