/* ── Container ── */
.ia-fe-wrap {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    color: #1d2327;
}

.ia-fe-notice {
    padding: 30px;
    text-align: center;
    color: #646970;
    font-size: 15px;
}

/* ── Header ── */
.ia-fe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}

.ia-fe-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
}

.ia-fe-back-link {
    font-size: 14px;
    font-weight: 400;
    color: #2271b1;
    text-decoration: none;
    margin-right: 8px;
}

.ia-fe-back-link:hover {
    text-decoration: underline;
}

/* ── Filters ── */
.ia-fe-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ia-fe-filters select,
.ia-fe-filters input[type="date"] {
    height: 36px;
    padding: 0 10px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
}

#ia-fe-custom-range,
#ia-fe-detail-custom-range {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Buttons ── */
.ia-fe-btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background: #fff;
    color: #1d2327;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
    text-align: center;
}

.ia-fe-btn:hover {
    background: #f6f7f7;
    border-color: #8c8f94;
    color: #1d2327;
}

.ia-fe-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ia-fe-btn-primary {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.ia-fe-btn-primary:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

.ia-fe-btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

/* ── KPI Cards ── */
.ia-fe-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin: 20px 0;
}

.ia-fe-kpi-card {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ia-fe-kpi-label {
    font-size: 11px;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.ia-fe-kpi-value {
    font-size: 26px;
    font-weight: 700;
    color: #1d2327;
}

/* ── Loading ── */
.ia-fe-loading {
    padding: 40px;
    text-align: center;
    color: #646970;
    font-size: 14px;
}

/* ── Tables ── */
.ia-fe-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ia-fe-table thead {
    background: #f6f7f7;
}

.ia-fe-table th {
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #646970;
    text-align: left;
    border-bottom: 1px solid #e2e4e7;
}

.ia-fe-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: middle;
}

.ia-fe-table tbody tr:last-child td {
    border-bottom: none;
}

.ia-fe-table tbody tr:hover {
    background: #f9f9f9;
}

.ia-fe-num {
    text-align: center !important;
    white-space: nowrap;
}

/* ── Progress Bar ── */
.ia-fe-progress-wrap {
    position: relative;
    background: #e2e4e7;
    border-radius: 10px;
    height: 22px;
    min-width: 80px;
    overflow: hidden;
}

.ia-fe-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #135e96);
    border-radius: 10px;
    transition: width 0.3s ease;
}

.ia-fe-progress-wrap span {
    position: relative;
    z-index: 1;
    display: block;
    text-align: center;
    font-size: 11px;
    line-height: 22px;
    font-weight: 600;
    color: #1d2327;
}

/* ── Charts ── */
.ia-fe-charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.ia-fe-chart-card {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ia-fe-chart-card h3 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.ia-fe-chart-card canvas {
    height: 280px !important;
}

/* ── Status Badges ── */
.ia-fe-badge-done {
    background: #00a32a;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.ia-fe-badge-progress {
    background: #dba617;
    color: #fff;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

/* ── Pagination ── */
.ia-fe-pagination {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    justify-content: center;
}

#ia-fe-page-info {
    font-size: 13px;
    color: #646970;
}

/* ── Students section ── */
#ia-fe-students-wrap h3 {
    margin: 30px 0 15px 0;
    font-size: 18px;
    font-weight: 600;
}

/* ── Countries (overview) ── */
#ia-fe-countries-wrap {
    margin-top: 30px;
}

.ia-fe-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 0 12px;
    flex-wrap: wrap;
}

.ia-fe-section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.ia-fe-countries-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 1.4fr;
    gap: 20px;
    align-items: start;
}

.ia-fe-countries-chart-card {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 8px;
    padding: 16px;
    max-height: 420px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.ia-fe-countries-chart-card canvas {
    max-height: 380px !important;
}

.ia-fe-countries-table-wrap {
    overflow-x: auto;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .ia-fe-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ia-fe-charts-grid {
        grid-template-columns: 1fr;
    }

    .ia-fe-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ia-fe-filters {
        width: 100%;
    }

    .ia-fe-table {
        font-size: 13px;
    }

    .ia-fe-table th,
    .ia-fe-table td {
        padding: 10px 8px;
    }

    .ia-fe-countries-grid {
        grid-template-columns: 1fr;
    }
}