#gaip-hub {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #f9fafb;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}
#gaip-hub h2 {
    margin-top: 0;
    margin-bottom: 10px;
}
.gaip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 10px;
}

/* Collapsible Card Styles */
.gaip-card {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
}

.gaip-card-header {
    padding: 10px;
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.gaip-card-header h3 {
    margin: 0;
    font-size: 15px;
    flex: 1;
}

.gaip-header-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.gaip-module-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    padding: 4px 8px;
    background: #ffffff;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    transition: background-color 0.2s;
}

.gaip-module-toggle:hover {
    background: #f9fafb;
}

.gaip-module-toggle input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.gaip-module-toggle span {
    white-space: nowrap;
}

.gaip-card-header:hover {
    background: #e5e7eb;
}

.gaip-card-toggle {
    font-size: 18px;
    font-weight: bold;
    color: #6b7280;
    transition: transform 0.2s;
}

.gaip-card.collapsed .gaip-card-toggle {
    transform: rotate(-90deg);
}

.gaip-card-body {
    padding: 10px;
    display: block;
}

.gaip-card.collapsed .gaip-card-body {
    display: none;
}

/* Original styles continue */
.gaip-card h3 {
    margin: 0;
    font-size: 15px;
}
.gaip-card h4 {
    margin-top: 10px;
    margin-bottom: 4px;
    font-size: 13px;
}
.gaip-card label {
    display: block;
    margin-top: 4px;
    margin-bottom: 2px;
    font-weight: 500;
}
.gaip-card input[type="text"],
.gaip-card input[type="number"],
.gaip-card input[type="date"],
.gaip-card select {
    width: 100%;
    box-sizing: border-box;
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    font-size: 13px;
}
.gaip-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}
.gaip-note {
    font-size: 12px;
    color: #6b7280;
    margin: 4px 0 6px;
}
.gaip-dates {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}
.gaip-dates input {
    flex: 1;
}
.gaip-grid-mini {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 8px;
    margin-bottom: 6px;
}
.gaip-grid-mini .gaip-row {
    display: contents;
}
.gaip-grid-mini span {
    font-size: 12px;
    align-self: center;
}
.gaip-grid-mini input[type="number"] {
    width: 100%;
    padding: 3px 4px;
    font-size: 12px;
}
.gaip-run-btn {
    margin-top: 4px;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
}
.gaip-run-btn:hover {
    opacity: 0.9;
}
.gaip-results {
    margin-top: 14px;
    border-top: 1px solid #e5e7eb;
    padding-top: 10px;
}
.gaip-results h3 {
    margin-top: 0;
    margin-bottom: 8px;
}
.gaip-result-block {
    margin-bottom: 8px;
    padding: 8px 10px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}
.gaip-result-block h4 {
    margin: 0 0 4px;
    font-size: 13px;
}
.gaip-result-body {
    font-size: 12px;
    color: #374151;
}

/* ============================================================
   INNER COLLAPSIBLE SECTIONS (within results)
   ============================================================ */
.gaip-collapsible {
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    background: #ffffff;
}

.gaip-collapsible-btn {
    width: 100%;
    padding: 10px 12px;
    background: #f9fafb;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.gaip-collapsible-btn:hover {
    background: #f3f4f6;
}

.gaip-collapsible-btn:focus {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

.gaip-collapsible-btn::after {
    content: '▼';
    font-size: 12px;
    color: #6b7280;
    transition: transform 0.2s ease;
}

.gaip-collapsible-btn.active::after {
    transform: rotate(180deg);
}

.gaip-collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: #ffffff;
}

.gaip-collapsible-content > * {
    padding: 12px;
}

.gaip-collapsible-content p {
    margin: 0 0 10px 0;
    line-height: 1.6;
}

.gaip-collapsible-content p:last-child {
    margin-bottom: 0;
}

.gaip-collapsible-content hr {
    margin: 12px 0;
    border: none;
    border-top: 1px solid #e5e7eb;
}

.gaip-collapsible-content strong {
    color: #1f2937;
    font-weight: 600;
}

/* ============================================================
   MLSN TABLE STYLES
   ============================================================ */
.gaip-mlsn-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 12px;
    background: #ffffff;
}

.gaip-mlsn-table thead {
    background: #f3f4f6;
}

.gaip-mlsn-table th {
    padding: 10px 8px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 2px solid #e5e7eb;
}

.gaip-mlsn-table td {
    padding: 8px;
    border-bottom: 1px solid #f3f4f6;
}

.gaip-mlsn-table tbody tr:hover {
    background: #f9fafb;
}

/* Status badge styling */
.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.deficient {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.borderline {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.adequate {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.high {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.no-data {
    background: #f3f4f6;
    color: #6b7280;
}

/* Row highlighting based on status */
.gaip-mlsn-table tr.status-deficient {
    background: #fef2f2;
}

.gaip-mlsn-table tr.status-borderline {
    background: #fffbeb;
}

.gaip-mlsn-table tr.status-adequate {
    background: #f0fdf4;
}

/* Status indicator styles */
.gaip-status {
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    margin: 10px 0;
}

.gaip-status.loading {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.gaip-status.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.gaip-status.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}