/* ── Desktop enhancements ── */
@media (min-width: 960px) {
    .cgl-container {
        padding: 24px 32px 100px;
    }
    .cgl-stats-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 16px;
    }
    .cgl-stat-card {
        padding: 22px 20px;
        min-height: 90px;
    }
    .cgl-title {
        font-size: 36px;
    }
    .cgl-filter-select,
    .cgl-search {
        min-width: 280px;
    }
    .cgl-button {
        padding: 12px 24px;
        font-size: 15px;
    }
}

/* ── Mobile: stack stat cards ── */
@media (max-width: 767px) {
    .cgl-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}
@media (max-width: 480px) {
    .cgl-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ══════════════════════════════════════════════════════════
   CGL Info Modal
   ══════════════════════════════════════════════════════════ */

.cgl-info-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    padding: 48px 24px 24px;
}

.cgl-info-modal {
    background: var(--bg-card);
    color: var(--text);
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.cgl-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
}

.cgl-info-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.cgl-info-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}

.cgl-info-close:hover {
    background: var(--bg-input);
    color: var(--text);
}

.cgl-info-body {
    overflow-y: auto;
    padding: 20px 24px 28px;
    -webkit-overflow-scrolling: touch;
}

.cgl-info-section {
    margin-bottom: 24px;
}

.cgl-info-section:last-child {
    margin-bottom: 0;
}

.cgl-info-section h4 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--text);
}

.cgl-info-section p {
    font-size: 13.5px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 10px;
}

.cgl-info-section ol {
    padding-left: 20px;
    margin: 0 0 10px;
}

.cgl-info-section ol li {
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.cgl-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 8px 0;
}

.cgl-info-table td {
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.cgl-info-table td:first-child {
    white-space: nowrap;
    font-weight: 500;
    color: var(--text);
    width: 180px;
}

.cgl-info-table td:last-child {
    color: var(--text-secondary);
}

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

/* ── Callout box ── */
.cgl-info-callout {
    border-left: 3px solid var(--apple-blue);
    background: var(--bg-input);
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    margin: 10px 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.cgl-info-callout strong {
    color: var(--text);
}

/* ── Step cards ── */
.cgl-info-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
}

.cgl-info-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 14px;
    background: var(--bg-input);
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.cgl-info-step-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--apple-blue);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.cgl-info-step strong {
    color: var(--text);
}

/* ── Section heading accent ── */
.cgl-info-section h4 {
    padding-left: 10px;
    border-left: 3px solid var(--apple-blue);
}

/* ── Dark mode ── */
body.dark-mode .cgl-info-modal {
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

body.dark-mode .cgl-info-callout {
    background: #2C2C2E;
}

body.dark-mode .cgl-info-step {
    background: #2C2C2E;
}

/* ── Mobile ── */
@media (max-width: 600px) {
    .cgl-info-overlay {
        padding: 12px;
    }
    .cgl-info-modal {
        max-height: 92vh;
        border-radius: 12px;
    }
    .cgl-info-header {
        padding: 16px 18px 12px;
    }
    .cgl-info-body {
        padding: 16px 18px 24px;
    }
    .cgl-info-table td:first-child {
        width: auto;
    }
    .cgl-info-step {
        gap: 10px;
        padding: 8px 10px;
    }
}
